Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mypy (https://mypy.readthedocs.io/en/stable/) is a static type checker for Python. It lets you optionally type your code using type hints, which are basically ignored by the Python runtime.
Note that mypy runs a little differently than some of the other linters -- because it needs to understand your imports, you generally run it on an entire project, not just a set of files. The way I wrote it is that it ignores the extensions configuration option, and defaults to running mypy against the project directory. If you want to run mypy against a subset of your project, you can pass the directory name(s) as
mypy_args
and then the linter will skip adding the project directory.I got some baffling windows failures on test runs, leading to me changing the way python requirements are installed during the github test action run. I still don't understand why this fixes it, but you can see in the last two commits of ascandella#1 that installing as one shot fixes it:
Broken: https://github.com/ascandella/lint-action/runs/434789642#step:9:57
Working: https://github.com/ascandella/lint-action/runs/434838676#step:9:1
I don't have a windows machine available to me to debug further.