-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(client): Add static typing Signed-off-by: GustaafL <[email protected]> * refactor(client): Add error checking for wrong content type Signed-off-by: GustaafL <[email protected]> * refactor(client): type client.py Signed-off-by: GustaafL <[email protected]> * refactor(cem): type as much some of the code Signed-off-by: GustaafL <[email protected]> * feat(mypy): add mypy to pre-commit checks Signed-off-by: GustaafL <[email protected]> * refactor(typing): add types for constraints and async parts Signed-off-by: GustaafL <[email protected]> * Update ci.yml Signed-off-by: Guus Linzel <[email protected]> * refactor(tests): remove commented code Signed-off-by: GustaafL <[email protected]> * refactor(errors): only use message in ContentTypeError Signed-off-by: GustaafL <[email protected]> * refactor(errors): raise specific errors when validating client inputs Signed-off-by: GustaafL <[email protected]> * refactor(cem): Logger typing changed to avoid accidental sharing Signed-off-by: GustaafL <[email protected]> * refactor(test): import future annotations Signed-off-by: GustaafL <[email protected]> * Update ci.yml Signed-off-by: Guus Linzel <[email protected]> --------- Signed-off-by: GustaafL <[email protected]> Signed-off-by: Guus Linzel <[email protected]>
- Loading branch information
Showing
9 changed files
with
207 additions
and
85 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
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,10 @@ | ||
#!/bin/bash | ||
set -e | ||
pip install --upgrade 'mypy>=0.902' | ||
pip install types-pytz types-requests types-Flask types-click types-redis types-tzlocal types-python-dateutil types-setuptools types-tabulate types-PyYAML | ||
# We are checking python files which have type hints, and leave out bigger issues we made issues for | ||
# * data/scripts: We'll remove legacy code: https://trello.com/c/1wEnHOkK/7-remove-custom-data-scripts | ||
# * data/models and data/services: https://trello.com/c/rGxZ9h2H/540-makequery-call-signature-is-incoherent | ||
files=$(find src \ | ||
-name \*.py | xargs grep -l "from typing import") | ||
mypy --follow-imports skip --ignore-missing-imports $files |
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.