Stubs are a standard python feature (PEP 561) so I'd expect them to work with any type checker which supports stubs, which should be all of them (as much of the ecosystem is typed via stubs).
It's hard to tell. Other similar options in other commands can mean things like "exit with status 0 even if errors are detected". Without installing pyrefly, I'm not sure what that flag's supposed to do. It's not documented on their site.
It adds a comment to suppress the error above each line in your codebase that causes an error, but it reports the errors before doing that, so you can only see the result after you re-run `pyrefly check`.
Oh! That's nifty. It leaves you with a baseline so you can stop making new mistakes, and gives you something to grep for when you want to fix existing ones.
Thanks for giving this a try! We go over how to use the upgrade tooling (`--suppress-errors`) in the guide here: https://pyrefly.org/en/docs/installation/. This is intended to make upgrading from different versions of type checkers easier. It’s something we use internally and wanted to share with the community along with the checker itself.
We also allow you the ability to suppress whole classes of errors if you want to ignore specific error types and avoid inline ignores: https://pyrefly.org/en/docs/configuration/ A word of caution: this will ignore future errors of this type as well.
First, make sure your project is properly configured and then follow the instructions. `--suppress-errors` will add ignores inline allowing the project to check cleanly. We have thought about a feature that allows you to keep suppressions in a separate file, but we have not put it on the roadmap yet. If this is something important for your workflow, we would like to learn more - please add a feature request on GitHub.
I expected that I would be able to run the check command and it would just work. Upon reading the docs, this tool recommends incremental adoption, and after using `--suppress-errors`, `# pyrefly: ignore` is all over my codebase.
I know I shouldn't get into this thread, but I'm extremely curious: what did you expect should have happened? I mean, literally, what do you mean by "just work", what work did you expect a type checker to perform if not to show you errors?
I think the point here is that for something like Python the default behaviour should be an assumed return type of `Any` rather than throwing an error. Maybe that is the case and the GP had configured it otherwise.
No it shouldn't because then you can easily miss places where you should have added a type annotation, and also your lazy colleagues won't bother adding them at all.
The worst of both worlds is colleagues who insert type annotations but they're wrong. And there's no CI pipe to verify the types before check-in.
Working with these things makes me often think that people who want to write high quality software should just use a better language. But, well, real world is real.
Yeah unfortunately Python is crazy popular so a lot of the time you don't get a choice.
If fairness if you set up uv and Ruff and Pyright it's kind of ok. Still have to deal with the general noobness of the ecosystem and the horrific performance, but I've seen worse.
> INFO 5,240 errors shown, 65,932 errors ignored
Not a single Python type checker had ever worked for me so far.