PyCharm 2021.2

Aggiunge il ricaricamento della pagina del browser al momento del salvataggio insieme alla modalità collaborativa nella console Python.
Luglio 29, 2021
Nuova versione

Funzionalità

  • Code insight
    • Python 3.10 - Delivered code insight for Explicit Type Aliases (PEP 613) in PyCharm 2020.3. In this release, support for even more PEPs has been added.
    • Pattern Matching (PEPs 634, 635, 636) - Structural Pattern Matching is coming in Python 3.10. PyCharm provides a number of key features to help you adjust to its arrival, like the Unused local symbols and Unreachable code inspections, smart code completion and syntax highlighting for the match and case keywords, and the Complete Current Statement action.
    • Complete Current Statement - PyCharm can now complete match statements and their corresponding case blocks. Once you’re done typing an initial match statement, you can choose Complete Current Statement (Shift+Ctrl+Enter) and PyCharm will complete the remaining part, including the colon and the first part of the case block. The caret will be left in place for you to start typing the rest of the case block.
    • Formatter - PyCharm’s built-in formatter now recognizes match statements and helps you format them correctly.
    • New syntax for union types (PEP 604) - In Python 3.10 you will be able to use int | str for union types instead of Union[int, str]. This functionality is already available in earlier versions of Python through the use of from __future__ import annotations. PyCharm provides overall code insight for the new syntax, including intention actions and information in the Quick Documentation. This release adds support for type inference for isinstance and issubclass arguments with the new syntax type.
    • Further improvements:
      • The type checker now recognizes typing.Literal in various collection types, which makes it possible to match against specific values of the collections’ elements. This works even for nested collections.
      • You can now use the doctest injection in Markdown to demonstrate the execution of Python code in REPL mode as though it were being executed in the Python console.
  • Collaborative development: Code With Me
    • Python console support - Working in the Python console is now supported on both the client machine and the host side. During a collaborative coding session, guests can review the code while the host runs it in the interactive console.
    • Synchronized code completion - When you are in Following mode during a Code With Me session, it is now possible to keep track of which code completion suggestions the person you are following uses. Also, for any session type, guests’ completion results are exactly the same as they would have been for the host.
    • Further improvements:
      • Code With Me recently launched two new relay servers: one on the west coast of the US and another one in South Africa. This has improved the ping.
  • IDE improvements
    • Tool window for Python packages: install packages from custom locations - In PyCharm 2021.1, Python Packages tool window to manage packages for the currently selected Python interpreter was added. Now you can install packages, not only from the PyPI repository, but also from VCS or a local machine.
    • Accessibility updates - PyCharm 2021.2 includes a number of helpful updates for coding with screen reader mode enabled on Apple macOS. It will narrate code completion suggestions, the content of the selected combo box and combo box lists and the results of your queries in Search Everywhere.
    • Further improvements:
      • Added a number of actions that will be initiated by saving the project, including reformatting code and optimizing imports. All of them are gathered in Preferences/Settings | Tools | Actions on Save.
      • It is now easier to drag and drop a tool window to the desired place within the main IDE window or in a separate window. You can drag it by clicking and holding the tool window name bar, and you can drop it in any highlighted area.
      • Upload custom icons by right-clicking on a project on the Welcome screen and selecting Choose project icon from the context menu.
      • Starting with this version, you can enjoy a fully localized UI in Chinese, Korean, or Japanese. Localization is available as a non-bundled language pack plugin, which can be easily installed in your IDE.
  • Databases
    • Code completion for fields and operators in the MongoDB console - PyCharm can now complete fields, nested fields and fields inside aggregation expressions, as well as query operators, projection operators, update operators and aggregation stages in the MongoDB console.
    • Context live templates from the data editor with SQL scripts action - Context live templates now work directly from the data editor. If you’re working with a table and you wish to query it, you can easily do so with the help of the SQL scripts action.
  • Frontend development
    • Reload pages in browser on save - You can now automatically update the pages in a browser as you edit and save your HTML, CSS and JavaScript files. All browsers are supported.
    • Rename refactoring for React useState hooks - You will no longer need to waste time on refactoring useState values and functions one by one – PyCharm can now rename both for you.
    • Auto-import for require() - The IDE can now add missing import statements as you complete CommonJS modules – required imports will be inserted on code completion.
    • Further improvements:
      • Adding new project dependencies to package.json has become even easier, as code completion now works for private npm packages. PyCharm lets you check information about the latest versions of the package, just like it does for public packages.
  • Version Control
    • Changes to pre-commit checks - Expanded the list of possible pre-commit actions with the ability to execute tests. Tick the Run Tests checkbox in the Before Commit section to test the applied changes. You can also customize the Analyze code and Cleanup options by clicking Choose profile next to them. The progress and results of all the pre-commit checks appear in the Commit area.
    • Space plugin - Connect PyCharm to your organization in JetBrains Space to view and clone project repositories and to review your teammates’ code.
    • Space job statuses in the Git log - Added icons for Space job statuses in the Log tab of the Git tool window to make it easier to track a job’s progress by just looking at the commits list. If you click on an icon, the IDE will open a popup with the automation info for that job.
    • Branch display in code reviews - Your IDE can now show related branches in the selected code review. You can see the list of branches that contain the commits made while working on the current issue in the Details tab.
    • Mention teammates - It is now more convenient to communicate with teammates in Space code reviews, as you can mention them with @ followed by the colleague’s name. This minor but helpful feature works in the timeline and in code comments.
    • Further improvements:
      • Added the ability to secure your commits by enabling Git commit signing with GPG.
Collaborative development

PyCharm

Python IDE con il supporto per Django.

PyCharm è disponibile anche in:

Hai una domanda?

Chatta live con i nostri specialisti di gestione delle licenze di JetBrains ora.