Skip to content

Detect !~ in roles #126

@hugovk

Description

@hugovk

:meth:`~list.pop` can be used to display pop().

:meth:`!list.pop` can be used to display list.pop() and avoid reference warnings.

:meth:`!~list.pop` cannot be used to display pop() and avoid reference warnings, instead it shows ~list.pop()

✅ We should instead write :meth:`!pop` to display pop().

Real life example: python/cpython#127054 (review)

Can we detect this with Sphinx Lint?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions