Fix error reporting
[tails.git] / pyproject.toml
blob66226745a4847c3a1d10aec42148d1b4e8641ef3
1 [tool.black]
2 # XXX:Bookworm: bump to py311
3 target-version = ["py39"]
4 extend-exclude = '''
6   ^/(submodules|tmp)/
8 '''
10 [tool.mypy]
11 mypy_path = "config/chroot_local-includes/usr/lib/python3/dist-packages"
12 warn_no_return = true
13 warn_return_any = true
14 warn_unused_configs = true
16 [[tool.mypy.overrides]]
17 module = [
18     "gi",
19     "gi.repository",
21 ignore_missing_imports = true
23 # https://github.com/astral-sh/ruff
24 [tool.ruff]
25 # This configuration is applied to the ruff editor by default, *except* in the context of CI,
26 # where bin/test-utils/ruff.toml is applied.
27 # Please keep them meaningfully synchronized: this file is for SHOULDs, the other file is for MUSTs.
29 # If you want to override it, you can do so by creating `ruff.toml`. If you think that your reasons for
30 # overriding could better be made "global" please say so by creating an issue and proposing to change our
31 # Python style guidelines.
33 # TODO: bump for Bookworm
34 target-version = "py39"
35 extend-exclude = [
36     "submodules/chutney",
37     "submodules/live-build",
38     "submodules/torbrowser-launcher",
39     "tmp",
40     "wiki/src",
42 extend-select = [
43     # Derived from the flake8-builtins linter
44     "A",
45     # Derived from the flake8-async linter
46     "ASYNC",
47     # Derived from the flake8-bugbear linter
48     "B",
49     # Derived from the flake8-blind-except linter
50     "BLE",
51     # Derived from the flake8-comprehensions linter
52     "C4",
53     # Derived from the mccabe linter
54     "C9",
55     # Derived from the flake8-commas linter
56     "COM",
57     # Derived from the pycodestyle linter
58     "E1",
59     # Derived from the eradicate linter (commented-out-code)
60     "ERA",
61     # Derived from the flake8-executable linter
62     "EXE",
63     # Derived from the flynt linter,
64     "FLY",
65     # Derived from the flake8-logging-format linter
66     "G",
67     # Derived from the isort linter
68     "I",
69     # Derived from the flake8-import-conventions linter
70     "ICN",
71     # Derived from the flake8-gettext linter
72     "INT",
73     # Derived from the flake8-implicit-str-concat linter
74     "ISC",
75     # Derived from the flake8-pie linter
76     "PIE",
77     # Derived from the pygrep-hooks linter
78     "PGH",
79     # Derived from the Pylint linter
80     "PLC",
81     "PLE",
82     "PLR",
83     "PLW",
84     # Derived from the flake8-pytest-style linter
85     "PT",
86     # Derived from the flake8-pyi linter
87     "PYI",
88     # Derived from the flake8-return linter
89     "RET",
90     # Derived from the flake8-raise linter
91     "RSE",
92     # Derived from the Ruff-specific rules linter
93     "RUF",
94     # Derived from the flake8-bandit linter (security)
95     "S",
96     # Derived from the flake8-self linter
97     "SLF",
98     # Derived from the flake8-simplify linter
99     "SIM",
100     # Derived from the flake8-slots linter
101     "SLOT",
102     # Derived from the flake8-debugger linter
103     "T100",
104     # Derived from the flake8-type-checking linter
105     "TCH",
106     # Derived from the flake8-tidy-imports linter
107     "TID",
108     # Derived from the flake8-todos linter
109     "TD",
110     # Derived from the tryceratops linter
111     "TRY",
112     # Derived from the pyupgrade linter
113     "UP",
114     # Derived from the pycodestyle linter
115     "W",
116     # Derived from the flake8-2020 linter
117     "YTT",
119 extend-ignore = [
120     # Accept shared, mostly innocuous habit
121     "RET505",
122     # Error-prone
123     "RSE102",
124     # Allow noqa directives that may be useful with other linters
125     "RUF100",
126     # We don't compile Python code so our `assert`s won't be optimized out
127     "S101",
128     # Prone to false positives (see https://github.com/astral-sh/ruff/issues/4045)
129     "S603",
130     # We don't record the author of a TODO, for better or worse
131     "TD002",
132     # Accept commonly used "TODO:Bookworm"
133     "TD007",