PyCharm 2022.1 EAP 2 is now out! This time around, we added a nice code insight enhancement for TypedDict, the ability to manage Python packages from custom repositories under authorization, several new improvements to Vue, and more to make your programming experience better!
Download the EAP builds via the Toolbox App or directly from our website.
Important: EAP builds are not fully tested and might be unstable.
Python installation on macOS
Another step taken toward making users’ lives easy – PyCharm can now install Python 3 for you. Usually macOS only comes with Python version 2.x out of the box. If there is no Python 3 on your machine, PyCharm can install it for you while configuring the system interpreter or virtual environment. PyCharm asks macOS to install Python 3 with the command-line developer tools. You can find the detailed process is described here.
Code insight
TypedDict: improved per-key warnings
When a dictionary created as a literal or the dict constructor is used where TypedDict is expected (assignments, function/method calls, return statements), PyCharm shows per-key error messages explaining exactly which individual values are wrong and where they are. PyCharm will now warn you which specific dictionary elements are missing and which elements are not defined for the dictionary.
UI / UX
Basic Authorization for Custom Package Repositories
With this EAP, you will be able to add custom package repositories with basic HTTP authorization and easily manage dependencies via PyCharm without switching to the terminal for manual installation.
To manage your dependencies via PyCharm, use the Python Packages tool window (it can be found at the bottom pane or using the double Shift shortcut). In this tool window, click on the gear icon next to “Add Package”. In the popup window, click “plus” to add a new package repository via its URL. Then if you want to add basic authorization, select the “Basic HTTP” option in the Authorization field and enter the credentials for the desired repository. Then click Apply.
The new repository will appear on the list of packages in the left side window.
New Notifications tool window
We replaced the Event Log instanсe with a new Notifications tool window. We hope it helps you maintain a better overview of notifications from the IDE so you don’t miss anything important.
By default, the new tool window is located on the bottom left side of the editor. All notifications that appear in it can be divided into two categories: Suggestions and Timeline. Here’s an example of what the Notifications tool window may look like for you:
We will continue working on the Notifications tool window to improve the overall workflow of receiving and managing suggestions, warnings, and other helpful messages.
New cases covered by the Join Lines action
Did you know PyCharm lets you join lines or blocks of code using ⌃⇧J / Ctrl+Shift+J? Now, this will work for nested if statements, producing the same result as the Merge if statements quick-fix. In addition, PyCharm will remove redundant braces when you use the Join Lines action on if, while, for-of, and other similar statements with one-lined blocks.
Code reformatting in LightEdit mode
We enhanced LightEdit mode, the functionality that allows you to edit your files without creating or loading the whole project, with a new feature. You can now reformat your code while in LightEdit mode. To do this, go to Code | Reformat Code in the main menu or press ⌥⌘L / Ctrl+Alt+L. For more information on LightEdit mode, see our documentation.
Improvements for Vue
PyCharm 2022.1 comes with several improvements for Vue 3. If you define components as global, the IDE will now recognize them in your .vue files. PyCharm should also properly support the createApp syntax. It will correctly match applications created using createApp with their related elements.
This version also includes support for Nuxt 3, a new version of a popular Vue framework.
Markdown
Run commands from Markdown files
README files often describe steps for running an app, listing a bunch of commands to be used. PyCharm 2022.1 will let you run those commands right from the README file – just click on the Run icon to the left of the command.
The new option can be managed via Detect commands that can be run right from Markdown files in Preferences / Settings | Languages & Frameworks | Markdown.
Copy code snippet for Markdown
We also added a new Copy code snippet action to Markdown blocks. This will allow you to quickly copy their contents to the clipboard.
VCS
Updated Annotate with Git Blame
We’ve improved the functionality of Annotate with Git Blame to make investigating introduced changes easier. The IDE highlights the difference in lines right in the editor when you hover on an annotation and opens the Git Log tool window when you click on it.
Git File History: new UI without index
The new UI for the Git File History tool window is now independent from the indexing process. The data is represented with a new interface even if the Log index is off.
Previously, for a file with unindexed history, the IDE would display an old history view that was relatively slow and missing features.
Open in Git Log as default action for Annotations
For better data representation, the Git Log tool window now automatically opens when you click on an annotation.
QA Tools
Page Object Editor improvements
With the upcoming release, the Selenium UI Testing plugin is getting a huge improvement for its Page Object Editor. We’ve optimized the workflow and redesigned the UI to ensure that fewer distracting elements appear. Unlike the previous version, you can instantly add page elements from the web page to the code on the fly and then continue editing without leaving the Page Object Editor.
When adding a new page element to the code in the updated version, you can choose which selector type to use (i.e. CSS, XPath, Aria-label, etc.).
Plugins
TOML plugin bundled
PyCharm 2022.1 EAP 2 bundles the TOML plugin so that you can work with TOML files out of the box.
Other notable improvements
Here are some other notable changes available in this build:
You can now configure the split tabs to have the same width. For this, tick the new Equalize proportions in nested splits option in Preferences / Settings | Advanced Settings [IDEA-231376].
The command-line formatter now supports a dry run mode to validate project files [IDEA-181641].
The Commit details pane now includes information about GPG signatures and build status. Previously, this data was shown only as a column in the Git log [IDEA-278968].
The manage.py console toolbar is no longer hidden. [PY-50213]
For the full list of the latest improvements available in PyCharm 2022.1 EAP 2, check out the release notes.