Skip to content

IDE Customization

BetterPy tweaks a handful of PyCharm UI surfaces — the navigation bar, Structure View, Go-to popups, and the run console — without touching your source code.


Python navigation bar

Since 2026.04.11 · Maturity Stable · Issues PY-53757

Enables an enhanced Python navigation bar with module path display, making it easier to see where you are in the project hierarchy.


Presentation

Enhanced Go to Implementation presentation

Since 2026.04.12 · Maturity Stable · Issues PY-82520

Prepends the owning class name to the method name in the Go to Implementation popup whenever two or more candidates share the same short name, so overrides can be told apart at a glance.

In a typical Python codebase, multiple classes implement a method with the same name — for example, several services implementing process, or a hierarchy of handlers all overriding handle. When you invoke Navigate → Go to Implementation (⌥⌘B / Ctrl+Alt+B) on such a method, PyCharm shows the Choose implementation popup with one row per candidate.

Out of the box, every row renders only the method name plus the file it lives in:

process  →  module_a.py
process  →  module_b.py
process  →  module_c.py

This creates a concrete pain point: Speed-search cannot narrow the list. The popup's type-to-filter search only matches against the method/class name only, not the FQN. Since every row shows the same method name, typing ServiceA or UserHandler filters out all rows instead of focusing on the override you want.

We contributes a gotoTargetPresentationProvider for Python that rewrites the row presentation when — and only when — there is a disambiguation problem. For each candidate method whose short name collides with another candidate in the same popup, the presentation is changed to ClassName.methodName, while the file/location column is kept intact:

ServiceA.process  →  module_a.py
ServiceB.process  →  module_b.py
ServiceC.process  →  module_c.py

With the class name inline you can now Use speed-search to narrow down — typing ServiceB filters the list down to the matching row, because the class name is part of the row's searchable text.

Candidates whose short name is already unique in the popup are left untouched, so the presentation stays minimal and only adds information when it's actually useful.


Filtering

Message console filter

Since 2026.04.14 · Maturity Stable

BetterPy turns selected Python run-console and test-console output into clickable links, so console text can take you back to the related test, file, or class.

The feature is passive: run tests or Python code normally, then click the highlighted part of a supported console line. If multiple Python classes match the same class name, BetterPy opens a chooser.

Pytest node IDs

Pytest node IDs link to the matching test function, method, class, or parametrized test case.

tests/test_orders.py::test_creates_order
tests/test_orders.py::TestCheckout::test_rejects_empty_cart
tests/test_orders.py::test_creates_order[premium-user]

The full node ID is linked. Parametrized IDs may contain nested brackets, quotes, or class reprs:

Pytest short summaries

Pytest failure and error summaries link the file or node ID before the - separator.

FAILED tests/test_orders.py::TestCheckout::test_rejects_empty_cart - AssertionError: ...
ERROR tests/test_orders.py::test_creates_order - RuntimeError: ...
FAILED tests/test_orders.py - AttributeError: module 'src.orders' has no attribute 'Order'

When a summary includes only a file path, BetterPy links the file. When it includes a full node ID, BetterPy links the test target.

Python class reprs

Python class reprs link the class name inside <class ...> output.

<class 'src.adapters.outbound.http.HttpAdapter'>
<class "src.adapters.outbound.http.HttpAdapter">

Only the class portion is highlighted, for example HttpAdapter. Nested classes are highlighted from the first class-like segment:

<class 'src.domain.OuterClass.InnerClass'>

AttributeError object types

AttributeError lines that include an object type link the reported class name.

AttributeError: 'GetCephFileSystemsQuery' object has no attribute 'name'
E   AttributeError: 'CheckoutService' object has no attribute 'submit'

For these lines, BetterPy highlights the object type itself, such as CheckoutService.

Object reprs

Object reprs link the represented object's class.

self = <src.adapters.outbound.http.HttpAdapter object at 0x10bbf0530>
value = <src.domain.orders.OrderCreated object at 0x10b7a7d90>

BetterPy highlights the class name, such as HttpAdapter or OrderCreated.

Exception class lines

Pytest traceback exception lines link class-like dotted names after the E prefix.

E           src.repositories.errors.RepositoryItemNotFound
E           src.domain.orders.OrderAlreadySubmitted

Names must look class-like, meaning at least one dotted segment starts with an uppercase letter. Plain variable-like names are ignored to avoid false positives.

Turns selected Python console output into clickable links. It recognizes pytest node IDs, pytest short-summary file paths, Python class reprs, object reprs, AttributeError object types, and exception class names.

Learn more: Message console filter


Structural Search Profile (Python)

Since 2026.04.12 · Maturity Incubating · Issues PY-15003

Adds a Python Structural Search profile integration for pattern matching and constraints. Use it to find and replace code patterns across your project.

How to invoke: EditFindSearch Structurally…

Try it yourself: paste the snippet below into a Python file, then open Search Structurally… and enter the pattern. The $name$ tokens are SSR placeholders — each one matches any single expression or identifier.

x.append(1)
y.append(2)
z.extend([3])
$obj$.append($arg$)

This pattern matches the two .append(...) calls but not the .extend(...) call. Open Edit variables… in the Structural Search dialog to add constraints — for example, restrict $obj$ to a specific type, set a count range on a placeholder, or require a regex on its text.

Learn more: see the IntelliJ Platform docs for Structural search and replace and the Search templates, modifiers, and script constraints reference for placeholder and modifier syntax.