forked from DataDog/integrations-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
120 lines (109 loc) · 2.88 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# NOTE: You have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[tool.black]
exclude = '''
# Directories
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
# New integration templates
| datadog_checks/dev/tooling/templates
# Vendored third party libraries
| datadog_checks/[^/]+/vendor
)/
|
# Files
(
# TODO: remove when upstream addresses https://github.com/DataDog/integrations-core/blob/c71e6d7204192a8002109da92452003598df2d28/datadog_checks_dev/datadog_checks/dev/tooling/signing.py#L9-L14
datadog_checks/dev/tooling/signing\.py$
)
'''
include = '\.pyi?$'
line-length = 120
skip-string-normalization = true
[tool.mypy]
plugins = "pydantic.mypy"
# Follows imports and type-check imported modules.
follow_imports = "normal"
# Ignore errors about imported packages that don't provide type hints.
ignore_missing_imports = true
# Don't require that all functions be annotated, as it would create
# a lot of noise for imported modules that aren't annotated yet.
# Note that this is the default behavior, but we're making our choice explicit here.
disallow_untyped_defs = false
# Include column numbers in errors.
show_column_numbers = true
# Mypy path is relative to the tox execution path, it correspond here to the integration folder.
mypy_path = "../.stubs"
# Exclude generated files
# TODO Remove when we drop python 2
exclude = '.*/config_models/.*\.py$'
[tool.ruff]
exclude = [
".eggs",
".tox",
"build",
"compat.py",
"__init__.py",
"**/datadog_checks/dev/tooling/templates/*",
"**/datadog_checks/*/vendor/*",
]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
# Rules were ported over from the legacy flake8 settings for parity
# All the rules can be found here: https://beta.ruff.rs/docs/rules/
select = [
"B",
"C",
"E",
"F",
"G",
"W",
"I",
]
ignore = [
# From legacy flake8 settings
"E721",
"E722",
"E741",
"B015",
"B904",
"B017",
# Allow non-abstract empty methods in abstract base classes
"B027",
"B905", # TODO: remove when we drop Python 2
# Ignore McCabe complexity
"C901",
]
unfixable = [
# Don't touch unused imports
"F401",
]
[tool.ruff.lint.isort]
known-first-party = ["{template_config['package_name']}"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
#Tests can use assertions and relative imports
"**/tests/**/*" = ["S101", "TID252"]
"datadog_checks/*/config_models/deprecations.py" = ["E501"]
"tests/models/config_models/deprecations.py" = ["E501"]
[project]
name = "integrations-core"
version = "0.0.0"
[tool.hatch.build]
dev-mode-dirs = ["."]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"