Browse Source

Update mypy to 0.730

There are some new capabilities in mypy 0.730, including nicer output
formatting, which this enables. I'd also like to be able to use the
specific error-code ignoring instead of the current all-encompassing
"type: ignore" comments, but there's currently an issue with that:
https://github.com/python/mypy/issues/7562
merge-requests/85/head
Deimos 5 years ago
parent
commit
5eecb189ac
  1. 2
      git_hooks/pre-commit
  2. 2
      git_hooks/pre-push
  3. 3
      tildes/mypy.ini
  4. 2
      tildes/requirements.txt

2
git_hooks/pre-commit

@ -3,7 +3,7 @@
# Pre-commit hook script that ensures mypy checks and tests pass # Pre-commit hook script that ensures mypy checks and tests pass
vagrant ssh -c ". activate \ vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy . \
&& echo 'Checking mypy type annotations...' && mypy --no-error-summary . \
&& echo 'Checking if Black would reformat any code...' && black --check . \ && echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \ && echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking SCSS style...' && npm run --silent lint:scss \ && echo 'Checking SCSS style...' && npm run --silent lint:scss \

2
git_hooks/pre-push

@ -3,7 +3,7 @@
# Pre-push hook script that ensures mypy checks, style checks, and tests pass # Pre-push hook script that ensures mypy checks, style checks, and tests pass
vagrant ssh -c ". activate \ vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy . \
&& echo 'Checking mypy type annotations...' && mypy --no-error-summary . \
&& echo 'Checking if Black would reformat any code...' && black --check . \ && echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \ && echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking SCSS style...' && npm run --silent lint:scss \ && echo 'Checking SCSS style...' && npm run --silent lint:scss \

3
tildes/mypy.ini

@ -3,6 +3,9 @@ mypy_path = /opt/tildes/stubs/
disallow_untyped_defs = true disallow_untyped_defs = true
ignore_missing_imports = true ignore_missing_imports = true
no_implicit_optional = true no_implicit_optional = true
pretty = true
show_error_codes = true
show_error_context = true
warn_redundant_casts = true warn_redundant_casts = true
warn_unused_ignores = true warn_unused_ignores = true

2
tildes/requirements.txt

@ -34,7 +34,7 @@ MarkupSafe==1.1.1
marshmallow==2.20.5 marshmallow==2.20.5
mccabe==0.6.1 mccabe==0.6.1
more-itertools==7.2.0 more-itertools==7.2.0
mypy==0.720
mypy==0.730
mypy-extensions==0.4.1 mypy-extensions==0.4.1
packaging==19.2 packaging==19.2
parso==0.5.1 parso==0.5.1

Loading…
Cancel
Save