pyright

last updated: Oct 20, 2023

useful documentation on using the type checker

Especially useful is the reveal_type function, which will show you the type that pyright has inferred. For example:

In this case, I used that statement to reveal that I needed to narrow the type to str so that pyright wouldn't flag the BeautifulSoup call as incorrect.

↑ up