PyCharm will warn you about forbidden combinations, like
except* operators in the same
return operators inside
except* clauses. Trying to catch an ExceptionGroup in a
clause will also raise a warning.
Python 3.11 adds the ability to mark individual keys of TypedDict as
NotRequired, so there’s no need to create complex class hierarchies
total parameter. PyCharm 2022.2 understands
NotRequired[ ] notations and provides code insight for them.
PyCharm 2022.2 recognizes star expressions in index operations (within brackets),
*args: *Ts in function definitions. If you’re not using Python 3.11,
the IDE will remind you that variadic generics are not yet available.
Now there is a convenient way to select a run environment using an icon on the gutter. To enable this feature, choose the Select Environment Before Run option from the Run with combo box.
To help you track the downloading process, we’ve added a progress bar to the Response view.
PyCharm 2022.2 supports WebSocket connections. With this API, you can send messages
to a server and receive event-driven responses without having to poll the server
for a reply. PyCharm can now send queries over HTTP and WebSocket protocols
out of the box.
wss:// are now delegated
to the WebSocket executor.
With the 2022.2 release, we’ve introduced support for GraphQL requests in the HTTP Client.
There is a new wizard for setting up interpreters at remote targets (WSL, SSH, Docker, Docker Compose, Vagrant). It makes the setup process more structured and easy to follow.
To instantly run and debug a single file without a dedicated run configuration, use Run Current File, which is available from the Run/Debug widget. It features a secondary menu that offers applicable runners along with the Run with Parameters action, which lets you tune the run configuration parameters before running the file.
You can now access Code Completion Settings and configure your preferences right from the kebab (three vertical dots) button in the code completion popup.
With PyCharm 2022.2 you can configure how an inspection appears in the editor. Set it up using the new Highlighting in editor drop-down menu, which conveniently shows all available highlighting styles.
JSON, YAML, and .properties files now feature automatically inserted web references
inside values that start with
https://. You can easily open
these links in a web browser with one click, or you can generate a request
in the HTTP client from the Context Actions menu (Alt + Enter).
The Cloning repository progress bar is now shown right in the Projects list, which makes it clearer and easier to use.
Choose whether you want the IDE to automatically insert parentheses on code completion: find the Insert parentheses automatically when applicable checkbox under Settings / Preferences | Editor | General | Code Completion.
When your file is detected as plain text, the IDE now suggests resetting the potentially unwanted file type association right from the editor.
For macOS users, we’ve introduced the ability to merge all opened project windows into one, turning them into tabs. This action is available from the Window menu.
"PyScript is a key part of Anaconda’s vision of democratizing data science and Python. We are excited to see JetBrains embracing the potential of PyScript by adding initial support within their professional product."
Principal Software Architect at Anaconda, Inc.,
co-creator of PyScript
<py-script> tag lets you execute multiline Python scripts and interact
with the page. PyCharm 2022.2 recognizes Python syntax, including NumPy and Matplotlib
libraries, for code inside
<py-script> tags in HTML files and provides
proper code completion and highlighting for it.
Code completion and syntax highlighting are now available for PyScript tags such as
<py-env> for declaring dependencies and
for creating REPL components.
You can preview your PyScript files directly in the PyCharm built-in browser in the same way you do for HTML files – with changes to the script displayed in the browser on each save.
With PyCharm 2022.2 you can resize image outputs by simply dragging the output’s bottom border. This should improve the readability of such outputs.
For your convenience, the bottom border will be made more noticeable.
You will be able to cut, copy, and paste cells with the respective actions (buttons and icons) right from the Jupyter editor toolbar.
You can now easily copy images from one Docker daemon to another using the new Copy Docker Image action that saves the image to a file and then pushes it to the chosen connection.
PyCharm integrates with Colima and Rancher to support more options for establishing connections to a Docker daemon.
PyCharm 2022.2 automatically connects to Docker after you restart the IDE. This new setting is enabled by default or it can be switched in Settings / Preferences | Advanced Settings | Docker.
PyCharm 2022.2 lets you import multiple CSVs into new or existing database tables. To do so, select multiple files in the Project view and drag them to a database schema or select Import to database in the context menu.
There are two resolve modes for your SQL scripts in PyCharm 2022.2. In Playground
mode, objects are resolved according to the context. It is now the default for query consoles.
In Script mode, the beginning of the file is resolved to the context, but any
SET CURRENT SCHEMA statements in the script change the context for the resolve.
Script mode is now the default for local files. To switch between the modes,
just use the drop-down on the toolbar.
PyCharm 2022.2 now offers basic support for 3 additional databases: DuckDB, Mimer SQL, and Apache Ignite.
In PyCharm 2022.2, all of a table’s child objects can be added and edited using the new Modify UI. The old UI will remain available via the context menu.