-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
55 lines (41 loc) · 1.67 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[mypy]
# regex to exclude files from mypy
# pip install creates a build folder (see https://github.com/pypa/pip/issues/8165 )
# ignore this to avoid 'duplicate module named' errors
# also exclude the test folder
exclude = .*((test|build)\/.*|setup.py)
# namespace pacakges omit the need to put init files everywhere,
# cf PEP420 or https://stackoverflow.com/questions/62831486/requirement-for-init-py-just-to-satisfy-pylint-and-mypy
# without this flag, mypy would ignore such packages and only check if there is a namespace package
namespace_packages = True
# get beyond default mypy settings
# cf. https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
# and https://mypy.readthedocs.io/en/sfloor/config_file.html
warn_unused_configs = True
warn_redundant_casts = True
# warn about # type: ignore that are not required
warn_unused_ignores = True
# do not allow the use of untyped import classes for typing
disallow_any_unimported = False
# have to type optional arguments explicitly
no_implicit_optional = True
# all methods and functions must be typed
disallow_untyped_defs = True
# warn about return values of untyped functions
warn_return_any = False
# ignore missing imports for untyped dependencies
# you might want to make this more granular..
ignore_missing_imports=True
[flake8]
max-line-length = 120
extend-ignore = E203, E501, E266, E402
#E501 line-length by Black
#E266 double ## in comments
max-complexity = 10
#https://en.wikipedia.org/wiki/Cyclomatic_complexity
# exclude certain files
# exclude = <file> or <folder>, <file> or <folder>
[tool:pytest]
python_files = test_*.py
# ignore certain files /folders
# addopts = --ignore=<folder> --ignore=<file>