Skip to content

Commit 24bea76

Browse files
authored
Move mypy config to setup.cfg (carbon-language#1239)
1 parent 7ef7d7a commit 24bea76

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.pre-commit-config.yaml

+2-12
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,9 @@ repos:
8989
rev: 'v0.950'
9090
hooks:
9191
- id: mypy
92+
# Use setup.cfg to match the command line.
9293
args:
93-
- --disallow-untyped-decorators
94-
- --warn-unused-configs
95-
- --disallow-subclassing-any
96-
- --disallow-untyped-calls
97-
- --disallow-untyped-defs
98-
- --disallow-incomplete-defs
99-
- --check-untyped-defs
100-
- --no-implicit-optional
101-
- --warn-redundant-casts
102-
- --warn-unused-ignores
103-
- --warn-return-any
104-
- --pretty
94+
- --config-file=setup.cfg
10595
# This should match the requirements added in the WORKSPACE pip_install.
10696
additional_dependencies:
10797
- gql >= 2.0.0, < 3.0.0

setup.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66
max-line-length = 80
77
# E203: This warning is not PEP 8 compliant.
88
extend-ignore = E203
9+
10+
[mypy]
11+
pretty = True
12+
# Define flags relative to strict mode.
13+
strict = True
14+
# TODO: Look at updating code to fix these.
15+
disallow_any_generics = False

0 commit comments

Comments
 (0)