Skip to content

Error messages of pyright file-level type checking mode directives are not updated #10988

@NCBM

Description

@NCBM

Describe the bug

The error messages:

  • "{directive}" is an unknown directive for pyright comment; expected "strict" or "basic" (pyrightCommentUnknownDirective)
  • Pyright comment must be followed by a directive (basic or strict) or a diagnostic rule (pyrightCommentMissingDirective)

are not updated. It still only includes basic and strict even when standard mode is already supported since 1.1.339 and the false positive of the message is also fixed in 1.1.383.

Code or Screenshots

Code sample in pyright playground

# Here shows pyright file-level type checking mode directives.
# 'none' and 'all' are just for comparison, they are indeed not supported.

# pyright: none
# pyright: basic
# pyright: standard
# pyright: strict
# pyright: all

# pyright:

VS Code extension or command-line

Reproducible in Pylance v2025.8.3 and Pyright 1.1.383 (the version that standard begins not to report error) and latest over pyright-play.net.

Metadata

Metadata

Assignees

No one assigned

    Labels

    addressed in next versionIssue is fixed and will appear in next published versionbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions