forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
89 lines (80 loc) · 2.83 KB
/
pyproject.toml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[tool.isort]
known_testlib = "tests.testlib"
known_unittests = "tests.unit"
known_livestatus = "livestatus"
known_omd = "omdlib"
known_cmk_utils = "cmk.utils"
known_cmk_automations = "cmk.automations"
known_cmk_base = "cmk.base"
known_cmk_ec = "cmk.ec"
known_cmk_gui = "cmk.gui"
known_cmk_cee = "cmk.cee.dcd,cmk.cee.liveproxy,cmk.cee.mknotifyd"
known_cmk_notification_plugins = "cmk.notification_plugins"
known_cmk_snmplib = "cmk.snmplib"
known_cmk_core_helpers = "cmk.core_helpers"
known_first_party = "cmk"
# Order sections according to our layering.
sections = """FUTURE,STDLIB,THIRDPARTY,TESTLIB,UNITTESTS,LIVESTATUS,OMD,CMK_UTILS,CMK_AUTOMATIONS,
CMK_SNMPLIB,CMK_CORE_HELPERS,CMK_BASE,CMK_EC,CMK_GUI,CMK_CEE,CMK_NOTIFICATION_PLUGINS,FIRSTPARTY,
LOCALFOLDER"""
# configuration options compatible with black
multi_line_output = 3
include_trailing_comma = "True"
force_grid_wrap = 0
use_parentheses = "True"
ensure_newline_before_comments = "True"
order_by_type = "False"
line_length = 100
py_version = "310"
[tool.black]
line-length = 100
target-version = ['py310']
# NOTE: Keep this is sync with mypy-raw.ini!
# The number of errors/files below are just a snapshot to give a rough idea. In
# addition, a single cause can imply multiple symptoms, so these numbers have to
# be taken with a grain of salt...
[tool.mypy]
plugins = ["pydantic.mypy"]
# When all of these are true, we can enable --strict
check_untyped_defs = true
disallow_any_generics = false # 1904 errors in 507 files
disallow_incomplete_defs = true
disallow_subclassing_any = false # 11 errors in 10 files
disallow_untyped_calls = false # 6427 errors in 1077 files
disallow_untyped_decorators = true
disallow_untyped_defs = false # 6738 errors in 1571
no_implicit_optional = true
no_implicit_reexport = false # 3026 errors in 1213 files
strict_concatenate = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = false # 821 errors in 304 files
warn_unused_configs = true
warn_unused_ignores = false # 1324 errors in 1281 files
# Miscellaneous stuff not in --strict
disallow_any_decorated = false # 3433 errors in 997 files
disallow_any_explicit = false # 2854 errors in 836 files
disallow_any_expr = false # 112427 errors in 3304 files
disallow_any_unimported = false # 317 errors in 47 files
warn_unreachable = false # 240 errors in 133 files
[[tool.mypy.overrides]]
module = [
"cmk.gui.painters",
"cmk.gui.plugins.views.mobile",
"cmk.gui.views.layout",
"cmk.gui.background_job",
"cmk.notification_plugins.*",
"tests.gui_e2e.*",
"tests.testlib.playwright.*",
"tests.unit.cmk.ec.*",
"tests.testlib.event_console",
]
disallow_untyped_calls = true
disallow_untyped_defs = true
warn_return_any = true
warn_unused_ignores = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true