Skip to content

Commit

Permalink
tweak mypy config (Chia-Network#9368)
Browse files Browse the repository at this point in the history
* tweak mypy config

* add types-click to pre-commit
  • Loading branch information
altendky authored Nov 24, 2021
1 parent b89d958 commit bf01b58
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/upload-pypi-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ jobs:
- name: Lint source with mypy
run: |
mypy --exclude config.py tests
mypy chia
mypy
- name: Build source distribution
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [types-aiofiles, types-setuptools, types-PyYAML]
additional_dependencies: [types-aiofiles, types-click, types-setuptools, types-PyYAML]
# This intentionally counters the settings in mypy.ini to allow a loose local
# check and a strict CI check. This difference may or may not be retained long
# term.
Expand Down
2 changes: 1 addition & 1 deletion chia/cmds/chia.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def monkey_patch_click() -> None:

import click.core

click.core._verify_python3_env = lambda *args, **kwargs: 0 # type: ignore
click.core._verify_python3_env = lambda *args, **kwargs: 0 # type: ignore[attr-defined]


@click.group(
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[mypy]
files = benchmarks,build_scripts,chia,tests,*.py
ignore_missing_imports = True
show_error_codes = True
warn_unused_ignores = True

[mypy - lib]
Expand Down

0 comments on commit bf01b58

Please sign in to comment.