-
-
Notifications
You must be signed in to change notification settings - Fork 182
/
pyproject.toml
80 lines (74 loc) · 1.99 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
# Formatters are optional, this configuration attempts to make as many
# tools "just work" in a way compatible with kobo code standards
[tool.black]
# Do not enable `verbose = true` unless Black changes their behavior to respect
# `--quiet` on the command line properly
# verbose = true
line-length = 88
skip-string-normalization = true
[tool.darker]
src = [
"kobo",
"hub",
"kpi",
]
isort = true
[tool.isort]
profile = "black"
line_length = 88 # same as black
known_first_party = "kobo"
no_lines_before = ["LOCALFOLDER"]
[tool.ruff]
line-length = 88
[tool.ruff.format]
quote-style = "single" # Preserve is coming soon to ruff
[tool.ruff.lint]
extend-select = [
"I", # Enable ruff isort
"Q", # Flake quotes
"E", # pycodestyle, some needs `--preview` to be enable
"N", # PEP-8 naming convention
"UP026", # deprecated mock
"UP034", # extraneous-parentheses
"UP039", # Unnecessary parentheses after class definition
"W1", # Indentation warning
"W292", # no newline at end of file
"T20", # (p)print found
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single" # To prefer single quotes over double quote
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.lint.isort]
known-first-party = ["kobo"]
[tool.flake8]
inline-quotes = "single"
multiline-quotes = "double"
docstring-quotes = "double"
max-line-length = 88
[tool.pytest.ini_options]
testpaths = [
'kobo',
'kpi',
'hub',
]
env = [
'DJANGO_SETTINGS_MODULE=kobo.settings.testing',
]
addopts = [
'-m not performance',
]
markers = [
"performance: marks test for performance that may unexpectedly fail on slower platforms (not executed by default - select with '-m \"performance\"')",
]
# Types are not enforced but are a good practice
[tool.mypy]
# Exclude virtual environment projects that cause mypy to error
exclude = [
"src/django-digest",
"src/formpack",
"src/kobo-service-account",
"src/python-digest",
]
[tool.django-stubs]
django_settings_module = "kobo.settings"