diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 670320afdc..33d2a24c46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: Lint tinygrad with pylint run: python -m pylint tinygrad/ - name: Run mypy - run: python -m mypy tinygrad/ --ignore-missing-imports --check-untyped-defs --explicit-package-bases --warn-unreachable + run: python -m mypy - name: Install SLOCCount run: sudo apt install sloccount - name: Check <5000 lines diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38f036e698..50a202ebe2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: pass_filenames: false - id: mypy name: mypy - entry: mypy tinygrad/ extra/helpers.py --check-untyped-defs --explicit-package-bases --warn-unreachable # --warn-return-any + entry: mypy tinygrad/ extra/helpers.py # --warn-return-any language: system always_run: true pass_filenames: false diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000000..8ce7fbae3e --- /dev/null +++ b/mypy.ini @@ -0,0 +1,7 @@ +[mypy] +warn_unused_configs = True +files = tinygrad +ignore_missing_imports = True +check_untyped_defs = True +explicit_package_bases = True +warn_unreachable = True