-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial pre-commit additions and cleanup. mypy compatibility fixes
Add an initial pre-commit pipeline and run across all files in the repo. Add various fixes for mypy related errors including adding stubs, ignoring certain dependencies in setup.cfg (for those where stubs couldn't be located), and manually add type ignore comments where necessary. These mypy related issues should be revisited in the future to see if they can be cleaned up in a more coherent way.
- Loading branch information
Showing
62 changed files
with
271 additions
and
189 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,86 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v2.6.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
files: ^src/|test/ | ||
|
||
- repo: local | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
entry: mypy ait | ||
language: system | ||
pass_filenames: false | ||
exclude: "bin/" | ||
|
||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black | ||
files: ^src/|test/ | ||
language: system | ||
#exclude_types: [yaml, yml, dat, txt] | ||
types: [python] | ||
|
||
- repo: local | ||
hooks: | ||
- id: flake8 | ||
name: flake8 | ||
entry: flake8 ait | ||
language: system | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: tlm_yaml_check | ||
name: AIT TLM YAML check | ||
entry: 'ait-yaml-validate --tlm' | ||
language: system | ||
stages: [push] | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: cmd_yaml_check | ||
name: AIT CMD YAML check | ||
entry: 'ait-yaml-validate --cmd' | ||
language: system | ||
stages: [push] | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: evr_yaml_check | ||
name: AIT EVR YAML check | ||
entry: 'ait-yaml-validate --evr' | ||
language: system | ||
stages: [push] | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: limits_yaml_check | ||
name: AIT LIMITS YAML check | ||
entry: 'ait-yaml-validate --limits' | ||
language: system | ||
stages: [push] | ||
pass_filenames: false | ||
|
||
- repo: local | ||
hooks: | ||
- id: tests | ||
name: Tests | ||
entry: pytest | ||
language: system | ||
stages: [push] | ||
pass_filenames: false |
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -77,4 +77,3 @@ | |
} | ||
} | ||
} | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.