Skip to content

Commit adae9fc

Browse files
bluetechpgjones
authored andcommitted
Move mypy configuration to setup.cfg
A bit nicer looking, and enables running mypy manually and in code editors.
1 parent 55a63f5 commit adae9fc

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

setup.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,30 @@ line_length=88
3030
multi_line_output=3
3131
no_lines_before=LOCALFOLDER
3232
order_by_type=False
33+
34+
[mypy]
35+
check_untyped_defs = True
36+
# disallow_any_decorated = True
37+
disallow_any_explicit = True
38+
# disallow_any_expr = True
39+
disallow_any_generics = True
40+
# disallow_any_unimported = True
41+
disallow_incomplete_defs = True
42+
disallow_subclassing_any = True
43+
disallow_untyped_calls = True
44+
# disallow_untyped_decorators = True
45+
disallow_untyped_defs = True
46+
; implicit_reexport = False
47+
no_implicit_optional = True
48+
# strict_equality = True
49+
strict_optional = False
50+
warn_redundant_casts = True
51+
# warn_return_any = True
52+
warn_unused_configs = True
53+
warn_unused_ignores = True
54+
[mypy-h11.*]
55+
ignore_missing_imports = True
56+
[mypy-pytest.*]
57+
ignore_missing_imports = True
58+
[mypy-_pytest.*]
59+
ignore_missing_imports = True

tox.ini

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ commands =
3636
basepython = python3.7
3737
deps = mypy
3838
commands =
39-
mypy wsproto/ test/ \
40-
--ignore-missing-imports \
41-
--disallow-untyped-defs \
42-
--no-strict-optional \
43-
--warn-unused-ignores
39+
mypy wsproto/ test/
4440

4541
[testenv:lint]
4642
basepython = python3.6

0 commit comments

Comments
 (0)