-
-
Notifications
You must be signed in to change notification settings - Fork 697
Expand file tree
/
Copy pathpyproject.toml
More file actions
76 lines (67 loc) · 2.04 KB
/
pyproject.toml
File metadata and controls
76 lines (67 loc) · 2.04 KB
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
[tool.coverage.run]
omit = [
# pants/engine/internals tests
"preludes/bad.py",
# from testprojects/src/python/vcs_test/
"tables.py",
# While BUILD files are Python, during testing we create/inject/munge and do
# all sorts of things with them that is hard to track
"BUILD",
]
[tool.mypy]
namespace_packages = true
explicit_package_bases = true
mypy_path = "src/python:tests/python:testprojects/src/python"
plugins = "mypy_typing_asserts.mypy_plugin,pants.ng.subsystem_mypy_plugin"
no_implicit_optional = true
implicit_reexport = false
strict_equality = true
warn_unused_configs = true
warn_unused_ignores = true
warn_return_any = true
warn_redundant_casts = true
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_context = true
show_traceback = true
[[tool.mypy.overrides]]
module = [
"botocore",
"bs4",
"chevron",
"colors",
"dockerfile",
"fasteners",
"freezegun",
"gnupg",
"hdrh",
"hdrh.histogram",
"ijson.*",
"nodesemver",
"pex.*",
"psutil",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = ["platform_specific_behavior"]
[tool.ruff]
# Exclusions were copied from [tool.black]
exclude = [".git", ".mypy_cache", ".pants.d", "dist/"]
line-length = 100
target-version = "py314"
[tool.ruff.lint]
# I: isort (import sorting)
# UP: pyupgrade (update Python code to `target-version`)
select = ["I", "UP"]
# UP006/UP035: replaces DefaultDict with collections.defaultdict - lots of churn (which SJ wants to batch after 3.14)
# UP007: Many buried, non-auto-fixable unions
# UP018: Replaces `int(42)` in tests, breaking call-by-type and implicitly
# UP031: Two string replacements that are not auto-fixable
# UP036: Outdated version check (in rule_visitor for Python 3.8)
# UP040/UP046/UP047: Cost-benefit unclear, see https://github.com/python/cpython/issues/114159
ignore = ["UP006", "UP007", "UP018", "UP031", "UP035", "UP036", "UP040", "UP046", "UP047"]
external = ["PNT20"]
[tool.ruff.lint.isort]
known-first-party = ["internal_plugins", "pants", "pants_test", "python_constant"]