Interactive widgets for Jupyter notebooks, MongoDB support, and code assistance for all Python 3.8 features are here.
To provide more interactivity, Jupyter notebooks support interactive controls known as interactive widgets. These controls let you turn static notebooks into interactive dashboards, allowing those who view your notebooks to customize their view. With this update, PyCharm adds support for interactive widgets. This means the widgets are rendered with the output and can be used to manipulate the notebooks just like it works with native Jupyter notebooks.
The IDE now supports the most popular libraries of widgets. If you find your library is not working, please make sure to file an issue.
One of the advantages PyCharm offers is intelligent coding assistance, made possible with our advanced static code analysis algorithms. However, for dynamic languages such as Python static code analysis is not always enough. This is why with this update, we extend it by leveraging the runtime information provided by Jupyter itself. This results in smarter code completion in some cases such as dictionary indices or deeply-nested expressions for which the IDE couldn’t figure out the type using the static analysis.
The preview’s font size can now either be set to be consistent with the editor or be customized in the settings. Also, the preview now respects the editor option `Change font size (Zoom) with Ctrl+Mouse Wheel `. When it’s enabled, you can zoom in or out in the preview using the mouse wheel while holding Ctrl.
Afraid of making a typo when writing a file name? Especially with longer file names like `open(‘data/survey_data_28112019_exported.csv’)`? Now you can get file path suggestions within the Python code editor or console. We’ve extended our context-aware code completion functionality, so string literals in file related contexts now show suggestions for possible file paths.
Do you prefer relative imports over absolute imports? PyCharm is now able to automatically convert between these styles. If you’re already importing from a certain package with a relative import, any new imports from that package will also automatically be created as relative imports.
Avoid incorrect value assignment for dictionaries by using PyCharm’s support for TypedDict. Get a precise representation for your key-value pair structures and let our code editor assist you with their proper usage.
Do you have a method that takes a specific literal string, like the file mode for `open`? You can use Python 3.8’s `Literal` type annotation to check for not only a type, but also a specific value. PyCharm will now warn you when you call a function with an unsupported value.
Our tool to create tests automatically got an upgrade and it now supports pytest as well. With this, PyCharm allows you to automatically create pytest tests by just clicking on the Go To | Test option from the context menu of a method declaration.
Tracking information while debugging should be as clear and detailed as possible. This is why we’ve tweaked the variables view so it now shows better-organized and comprehensive data. With this, expect new ordering, improved visual representation for scientific arrays, display of length for collections, and removal of duplicated details.
PyCharm can help you get your work done faster with its advanced code insight. For this to work, we need to index both your code and all the packages you import. When you use a package with compiled extensions, like many data science packages, before we can index it we need to generate Python skeletons (stub files) that describe the Python interface. We’ve made improvements to this process, and you can expect the entire indexing process to be at least 25% faster. Of course, if you use the same package in multiple virtualenvs, we reuse the index we’ve already created.
Unfortunately, there are times when PyCharm’s UI freezes for some time before letting you get back to working on your code. We realize this is something that is highly unpleasant, and that’s why we’re working hard on eliminating these. We’ve fixed many issues that could cause UI freezes, and have now added the ability for you to immediately report a UI freeze directly from the IDE, which will make it possible for us to investigate why it froze, and ensure it doesn’t happen again. Thank you in advance for helping us get rid of UI freezes in PyCharm!
Are you building an application on MongoDB? Then you’ll be happy to learn that you can now explore your MongoDB collections in PyCharm. Connect your database by adding a data source from the database tool window (View | Tool Windows | Database). PyCharm Professional Edition comes with all database features from JetBrains DataGrip, the professional SQL IDE made by JetBrains.
When you’re making a command-line application, it’s usually convenient to be able to change the arguments quickly. Although you could always just go into `Edit Configuration` to change them, there’s a better way now: with the new run configuration macros (variables) you can have PyCharm prompt you for the value every time you start your application.
Want to know how frequently some text occurs in a section of your file? The find action is now scoped to your selection at first. Want to search everywhere? Press Ctrl-F again to expand your search to the rest of the file.
The more branches you have, the harder it gets to keep track of the difference between them. In the new version of PyCharm, the branch comparison functionality looks better and gives you a quick overview of what commits make the difference between the two branches.
No matter what type of repository you use, we now have a single place to start when you want to check out a new project.
Do you use a stylesheet from a CDN? We can now download a version of that stylesheet specifically to use for code completion.
Just like in the Python debugger, the JavaScript debugger can now show you the return values of methods you’re calling. To see the return values, click the gear icon on the debugger and enable ‘Show Return Values’.