Skip to content

Help messages with dunders are rendered as bold instead of displaying literal __ #5699

@zanieb

Description

@zanieb

Help messages with content that includes __XXXX__ is rendered bold instead of displaying the __ which is common for dunder variables.

Screenshot 2023-07-11 at 19 04 06
example.py:1:22: F401 [*] `.version.__version__` imported but unused
  |
1 | from .version import __version__
  |                      ^^^^^^^^^^^ F401
  |
  = help: Remove unused import: `.version.version`

Found 1 error.
[*] 1 potentially fixable with the --fix option.

or

example.pyi:3:32: PYI016 Duplicate union member `Literal["__test__"]`
  |
1 | from typing import Literal, Union

2 | 
3 | x = Union[Literal["__test__"], Literal["__test__"]]
  |                                ^^^^^^^^^^^^^^^^^^^ PYI016
  |
  = help: Remove duplicate union member `Literal["test"]`

Originally reported in #5697 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions