-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
128 lines (112 loc) · 2.63 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
121
122
123
124
125
126
127
128
[project]
name = "jubilant"
description = "Juju CLI wrapper for charm integration testing"
readme = "README.md"
requires-python = ">=3.12"
dynamic = ["version"]
[dependency-groups]
dev = [
"pyright==1.1.394",
"pytest==8.3.4",
"pytest-cov==6.0.0",
"ruff==0.9.6",
]
docs = [
"sphinx==8.1.3",
"sphinx-rtd-theme==3.0.2",
]
# Linting tools configuration
[tool.ruff]
line-length = 99
target-version = "py312"
extend-exclude = ["docs/*"]
# Ruff formatter configuration
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I001",
# pep8-naming
"N",
# flake8-builtins
"A",
# pyupgrade
"UP",
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# Ruff specific
"RUF",
# Perflint
"PERF",
# pyflakes-docstrings
"D",
]
ignore = [
# Use of `assert` detected
"S101",
# Do not `assert False`
"B011",
# `pickle`, `cPickle`, `dill`, and `shelve` modules are possibly insecure
"S403",
# `subprocess` module is possibly insecure
"S404",
# No explicit `stacklevel` keyword argument found
"B028",
# Return condition directly, prefer readability.
"SIM103",
# Use contextlib.suppress() instead of try/except: pass
"SIM105",
# Use a single `with` statement with multiple contexts instead of nested `with` statements
"SIM117",
# Missing docstring in magic method
"D105",
# Missing docstring in `__init__`
"D107",
# Manual dict comprehension.
"PERF403",
# Convert {} from `TypedDict` functional to class syntax
# Note that since we have some `TypedDict`s that cannot use the class
# syntax, we're currently choosing to be consistent in syntax even though
# some can be moved to the class syntax.
"UP013",
## Likely worth doing, but later.
# `subprocess` call: check for execution of untrusted input
"S603",
# Starting a process with a partial executable path
"S607",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id", "min", "map", "range", "type", "input", "format"]
[tool.ruff.lint.per-file-ignores]
"jubilant/statustypes.py" = [
# Missing docstring in public class
"D101",
]
"test/*" = [
# All documentation linting.
"D",
]
[tool.pyright]
include = ["jubilant/*.py", "test/unit/*.py", "test/integration/*.py"]
pythonVersion = "3.12"
pythonPlatform = "All"
typeCheckingMode = "strict"
reportPrivateUsage = false
[tool.pytest.ini_options]
pythonpath = [
"."
]