When comparing Pyright vs flake8, the Slant community recommends flake8 for most people. In the question“What are the best Python code linters?” flake8 is ranked 2nd while Pyright is ranked 3rd. The most important reason people chose flake8 is:
Project-level settings for flake8 are in the tox settings file. It is trivial to run flake8 inside setup.py or pavement.py.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Does fast, asynchronous type checking
Pro Available in any text editor that implements Microsoft's Language Server Protocol
Pro Made by Microsoft
They wouldn't make a tool unless they saw a need for it and they have a lot of code to test it against. It also forces them to be mindful of its performance and the time costs associated with using it.
Pro Integration with build tools like tox
Project-level settings for flake8 are in the tox settings file. It is trivial to run flake8 inside setup.py or pavement.py.
Pro Allows usage of and writing of plugins
Flake8 has the ability to run thrid-party plugins, including plugins you can write yourself. Here you can find a few useful plugins.
Pro Easy to ignore files and lines
Add "noqa" comments to files and lines to skip processing. Code comments make it easy to find and review exceptions with grep.
Pro Wraps multiple analysis tools
Flake8 is a wrapper around PyFlakes, pep8, and McCabe Complexity analysis.