Skip to content

Errors are shown despite files being in "exclude" in pyrightconfig.json #168

@bfelbo

Description

@bfelbo

Describe the bug
I need to import a local version of psycopg2, which throws a lot of pyright errors (despite working fine). I want to ignore these errors and have created the following pyrightconfig.json in the root directory of the codebase:

{
    "reportMissingImports": false,
    "include": ["./*.py"],
    "exclude": ["./psycopg2/"]
}

However, the errors still show when I open any of the python files that imports the psycopg2 library. I've also tried "exclude": ["./psycopg2/*"] and "exclude": ["./psycopg2/**"] just in case that helped.

Expected behavior
Errors from analyzing files in "exclude" should be suppressed.

VS Code extension or command-line
VS Code Extension, newest version.

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