Skip to content

bug: python highlighting borked sometimes (parameter interpreted as function) #757

@k4lizen

Description

@k4lizen

Description of the bug

Here is the markdown:

```python
def __exit__(self, exc_type, exc_value, traceback) -> None:
    """
    Automatic breakpoint removal.
    """
    self.remove()
```

```python
__exit__(exc_type, exc_value, traceback) -> None
```

::: pwndbg.dbg.StopPoint.__exit__

It renders like this:

Image

The exc_type parameter shouldn't be highlighted. It is wrongly marked as nf by pygments which is for functions.

To Reproduce

git clone https://github.com/k4lizen/pwndbg
cd pwndbg
git checkout weird-high
uv run --group docs mkdocs serve --strict

Look at http://127.0.0.1:8000/pwndbg/setup/

Expected behavior

The exc_type parameter shouldn't be highlighted. It is wrongly marked as nf by pygments which is for functions.

Environment information

- __System__: Linux-6.13.7-artix1-1-x86_64-with-glibc2.41
- __Python__: cpython 3.13.2 (/path/pwndbg/.venv/bin/python3)
- __Environment variables__:
- __Installed packages__:
  - `mkdocstrings` v0.29.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy