1
0
Fork 0

ci: use `mypy.ini` (#1993)

pull/1998/head
Vidhan Bhatt 2023-10-06 04:45:28 -04:00 committed by GitHub
parent e43d8977f8
commit 94b21c41a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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

7
mypy.ini 100644
View File

@ -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