PyCharm 2023.2: New Live Templates for Django, Black Formatter Integration, Run Anything, and AI Assistant
Get the most out of your developer experience with the latest PyCharm features. With this release, you can now type your Django code faster with the new live templates, reformat your code in one click with the integrated Black formatter, and generate commit messages with the help of AI Assistant. Read on below for the full list of enhancements!
The Toolbox App is the easiest way to get the new version, but you can also manually download it from our website.
See the new features in action!
To learn about all of the enhancements in PyCharm 2023.2, join our YouTube livestream on August 1 at 5:00 pm CEST (3:00 pm UTC). We welcome all of your questions!
Key updates
Updates to Django support [PyCharm Professional]
New live templates for Django forms and models
PyCharm 2023.2 extends the list of Django live templates. New live templates will let you insert common code constructs for Django views, forms, and models (including admin
) by typing short abbreviations. We’ve also expanded the list of live templates that can be used to quickly create Django tags in template files.
Endpoints tool window for Django
The Endpoints tool window now has initial support for the Django REST framework. You can search for endpoint declarations, navigate to specific endpoint declarations, and rename URL path segments. While working with the HTTP Client tab, you will get code completion when modifying endpoints. Try the feature and share what functionality you would like to see added in future PyCharm releases!
Black formatter integration
PyCharm 2023.2 includes integration with the Black formatter. If you already have Black installed, PyCharm will detect it and suggest setting it up for your project. In PyCharm, Black works with .py
and .pyi
files. Whole files and file fragments can both be formatted. Learn more about configuration options for Black on the dedicated help page.
Run Anything
PyCharm 2023.2 introduces Run Anything – a tool that allows you to literally run anything, no matter which file is currently open. Use it to quickly create and launch run/debug configurations, launch the Python console, manage Python packages, or run applications, scripts, commands, and tasks. To open the Run Anything popup, press ^
+^
(Ctrl+Ctrl) twice.
AI Assistant [Limited access] [PyCharm Professional]
With this release, we introduce a major addition to PyCharm Professional – AI Assistant. At the moment, AI Assistant offers integrated AI chat and can do things like automatically write documentation comments for you, suggest names, generate commit messages, and more.
To access the assistant’s AI features, you’ll need to install the AI Assistant plugin and log in to the JetBrains AI service using your JetBrains Account. The availability of the JetBrains AI service may vary initially. For more information on AI Assistant and instructions on how to access it, refer to this blog post.
GitLab integration [PyCharm Professional]
PyCharm 2023.2 introduces integration with GitLab to streamline your development workflow. You can now work with the Merge Request functionality right from the IDE: Review the list of requests, check the changes, leave comments, and navigate to relevant views.
Other updates
User experience
- We simplified the Run/Debug Configurations dialog for Python run configurations.
- We reworked the Python Packages tool window: Now you can install new packages or check and update the installed ones directly from the list of packages.
- You can now fold complicated Python type annotations.
- You can now selectively commit specific parts of code chunks.
User interface
- In PyCharm 2023.2, you can assign a unique color and icon to each of your projects. You can also customize the predefined colors of the project headers.
- We’ve introduced the Light with Light Header theme, which features matching light colors for window headers, tooltips, and notification balloons.
- You can now arrange your files in the Project view based on their modification times.
- To make managing multiple run configurations easier, we’ve implemented the option to pin preferred configurations in the Run widget.
Code insight
- If you use the Qt Modeling Language (QML) in your code, you will now benefit from QML syntax support.
- To make function calls that contain a lot of arguments easier to read, PyCharm 2023.2 provides inlay parameter name hints.
- PyCharm now recognizes function calls annotated with
typing.NoReturn
, and it provides correct information about unreachable code and potentially uninitialized variables. - As part of its pytest support, PyCharm now provides correct type inference, navigation, and code completion for overridden fixtures.
- PyCharm 2023.2 automatically recognizes files with the
.jinja
file extension as Jinja templates and provides the respective syntax highlighting and code completion. Files with composite extensions, for example, Ansible templates, now have proper syntax highlighting and code completion for both the template language and the data language.
Data science [PyCharm Professional]
- You can now configure managed Jupyter servers.
- In PyCharm 2023.2, you can work with interactive Polars tables in Jupyter notebooks.
Performance
PyCharm 2023.2 features a new command-line tool for quickly building and uploading shared indexes. The new tool simplifies the process of generating shared indexes for your team, requiring just a few clicks instead of multiple scripts and services.
Bundled Qodana code quality platform [PyCharm Professional]
You can now trigger an analysis right from within PyCharm, view a list of problems across your entire project, and set up quality gates in your preferred CI/CD system. Qodana has just been released out of preview, and you can learn more about it in this blog post.
Web development [PyCharm Professional]
- TypeScript and JavaScript type errors and warnings will now be formatted in a more readable way, making it easier to spot problems in your code.
- PyCharm 2023.2 now supports CSS nesting.
- The OpenAPI Specifications plugin is now bundled in PyCharm 2023.2.
- PyCharm supports schema validation functionality for AsyncAPI specifications and provides code completion for references, the Endpoints view, and the Editor Preview pane.
- There are several enhancements for the built-in HTTP Client: support for JavaScript imports, Swagger and OpenAPI schemas, GraphQL, and WebSocket, as well as the ability to work with the gRPC requests using TLS and get PDF and HTML previews for responses.
Database tools [PyCharm Professional]
- You can now connect to Redis Cluster via PyCharm and have the same feature set as with standalone Redis.
- Shared databases and their contents in Redshift are now introspected by PyCharm. The datashares that these databases are created on are also introspected.
- The Data Editor and Viewer settings page has a new Time zone field for setting the time zone in which the
datetime
value should be displayed. - A new UI for the schema migration dialog makes it easier to understand which objects are going to be added, removed, or changed in the target schema.
These are the most notable updates included in the PyCharm 2023.2 release. For a comprehensive overview of all the changes, please consult the release notes.
Your feedback is highly appreciated and plays a crucial role in improving the product. We encourage you to share your thoughts and suggestions regarding the new features and updates. Feel free to get in touch with us on Twitter or by leaving a comment below. If you spot a bug while working with the IDE, please report it to our issue tracker.