# python/basedpyright

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

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

Part of the [`python`](/reference/configurations/python/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `push` [stage](/start/concepts/#stage), once per scope. It runs basedpyright.

## Why

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

## What to do

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>"`.

## Example

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

## Turn it off

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

```shell
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:

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