Skip to content

python/basedpyright

Type checks the project. At level all, it also requires annotations.

Part of the python configuration, at the recommended level. It runs at the push stage, once per scope. It runs basedpyright.

Each type error found here becomes a crash that never reaches a user.

Fix the type, or narrow it where the value arrives. Accept a file that needs another dependency set with gspot ignore python/basedpyright --paths <path> --reason "<why>".

count: int = "one" reports an incompatible type. Assign a number, such as count: int = 1, or change the annotation to str.

Turn it off for some files, or one of its lint rules, with a reason:

gspot ignore python/basedpyright --paths "<glob>" --reason "<why>"
gspot ignore python/basedpyright --rule <rule> --reason "<why>"

To silence one place, write a comment such as:

value = payload['key'] # type: ignore[index] # the payload is checked above