Skip to content

Include diagnostic error codes in tooltips #49

@daizutabi

Description

@daizutabi

Description

Currently, diagnostic message and source are displayed in tooltips. However, the diagnostic code (e.g., reportUnusedImport) is missing.

Proposed Change

It would be helpful if the diagnostic rendering included the error code alongside the source.

Justification

  1. Searchability: Users can easily copy the specific error code (like reportUnusedImport) to search for detailed documentation or solutions.
  2. Configuration: Users need these codes to configure lint rules (e.g., adding them to the ignore list in pyproject.toml).
  3. IDE Standard: IDEs like VS Code follow this pattern by displaying both the source and the error code.

Desired format

message
source(code)

Example:

Import "os" is not accessed
basedpyright(reportUnusedImport)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions