It’s so lonely at the top of Olympus.
Zeus, the eternal king of the gods, faced some hard times while trying to maintain his reign. Hades nearly usurped his brother, Zeus, in a battle for control. As the battle raged, most of the the Gods took Zeus’s side, because who wants to mess a guy that shoots lightning, but some of the more disgruntled Gods took Hades’ side and the battle raged.
The back-end programming world is not unlike Mount Olympus. There is always a battle raging for supremacy, and in 2020, the battle still rages between Java and Python. And, like the ancient Greeks, most developers choose to “worship” one or two commonly used programming languages. However, unlike Ancient Greece, modern programmers are (slightly) more flexible.
There are coding polyglots out there who dabble in more than one back-end programming language, and do it using a single IDE. Some might call them blasphemers, we prefer to think of them as peacemakers.
If you happen to be one of those, and now looking to effectively program in Python (or Jython – a kind of mixture of both Java and Python) in Intellij IDEA – this post is for you! We’ve assembled a list of plugins that add Python coding functionality, and also to help you do it more efficiently.
Python in Intellij IDEA vs PyCharm
The main advantage of the Intellij IDEA Python plugin over PyCharm is its full range of Jython support features (cross-language navigation, completion and refactoring). PyCharm only supports Jython as the runtime for running applications. So if you’re using Java/Python integration in your project, PyCharm alone won’t get the job done.
So let’s start with the basics: installing the plugin to enable Python support in Intellij IDEA.
How to add Python to Intellij IDEA
To give your Intellij IDEA all the functionality of the popular PyCharm flavor of the JetBrains IDE all you need to do is install the official Python plugin by JetBrains.
7 Python Plugins for Intellij IDEA
As the name suggests, this plugin is a Python linter. It provides both real-time and on-demand scanning of Python files with Pylint from within you Intellij IDEA. Pylint is an open source project so it can be fully customized for your needs. In addition, Pylint has extensive documentation on the plugin website.
This handy little plugin is a smart alternative to the “Execute Line in Console” command. It automatically determines the number of lines to be sent to the Python console and is easy to access with a keyboard shortcut: alt shift A.
Mypy is an optional static type checker and source code analyzer for Python that aims to combine the benefits of dynamic (or “duck”) typing and static typing. Among others, it looks for programming errors, helps enforce a coding standard and sniffs for some code smells.
Developed by the JetBrains research division, this plugin promises to seek out potential bugs and quality issues in your Python code by using deep learning models. DeepBugs can detect bugs like incorrect function arguments, incorrect comparison, and others, based on extracted code semantics.
This last plugin in our list is a handy collection of three inspections you can run on your Python code to attempt to detect potentially dead code and intentions for generating boilerplate code. This plugin will seek out potentially unused classes, functions (including methods) and names (in global and class-level assignments) in your code.
Beyond Python – Other Intellij IDEA Plugins
Previously published at https://blog.codota.com/python-plugins-for-intellij-idea/