robotpy / robotpy-commands-v2

Python implementation of the WPILib Command Framework (2020+)
Other
2 stars 14 forks source link

Use reviewdog to comment on PRs #36

Closed virtuald closed 5 months ago

TheTripleV commented 5 months ago

Use pyright instead of mypy? That's what vscode python runs

auscompgeek commented 5 months ago

FWIW reviewdog only flags violations within the diff... which works well if the linter doesn't look cross-file, but type checkers do, and changing the type in one module can cause a type check error in a different module, which reviewdog wouldn't show.

We can use a problem matcher to have GitHub annotations though, like https://github.com/thedropbears/pycubehammer/blob/3bca17130da8621c7ba9990a8c9c016622f7efdd/.github/workflows/ci.yml#L44-L48

auscompgeek commented 5 months ago

Use pyright instead of mypy?

In my experience I've personally found pyright to be too strict. I haven't run it on commands2 yet though.

TheTripleV commented 5 months ago

I only run pyright basic mode. I'd never do strict mode lol

virtuald commented 5 months ago

I don't really care which one is run, as long as one of them is, and it outputs annotations on the PR. I like the problem matcher approach.