-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type annotations to the project and use mypy (#2588)
Provide type annotations and use mypy for static type checking. Type checkers help ensure that the project is using variables and functions in the code correctly. With mypy, CI will warn when those types are used incorrectly. The mypy project and docs: https://github.com/python/mypy https://mypy.readthedocs.io/en/stable/index.html
- Loading branch information
Showing
7 changed files
with
386 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: mypy | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: Install dependencies | ||
run: pip install -e .[types] | ||
|
||
- name: Run mypy | ||
run: mypy . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from ._codespell import _script_main, main # noqa | ||
from ._version import __version__ # noqa | ||
from ._codespell import _script_main, main | ||
from ._version import __version__ | ||
|
||
__all__ = ["_script_main", "main", "__version__"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.