Skip to content

Separate "possibly unbound" and "certainly unbound" diagnostics #6896

@daquexian

Description

@daquexian

Is your feature request related to a problem? Please describe.
There are many issues about the false positive "possibly unbound" diagnostics, like #3041 and #4087. I know it is designed but these false positive cases greatly bother me. Meanwhile, I don't want to suppress the "certainly" unbound diagnostics, which always mean a bug.

Describe the solution you’d like

Separate "possibly unbound" and "certainly unbound" diagnostics, so that I can write a pyrightconfig.json like

{
  "reportCertainlyUnboundVariable": "error",
  "reportPossiblyUnboundVariable": "information",
}

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