-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpyproject.toml
198 lines (190 loc) · 7.19 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
[tool.djlint]
blank_line_after_tag="load,extends,import,from"
blank_line_before_tag="load,extends,block"
max_line_length=120
# _base.html excluded due to the bad </script> nesting after format
exclude=".templates/layouts/_base.html"
# when using double quote escape sequence in strings we get "H025 Tag seems to be an orphan" false positives
ignore="H025"
[tool.poetry]
name = "eq-questionnaire-runner"
version = "1.0.0"
description = "ONS Digital eQ Questionnaire Runner App"
authors = ["ONSDigital"]
[tool.poetry.group.dev.dependencies]
# update dependabot.yaml when adding new dependencies
pep8 = "^1.7.1"
mock = "^5.1.0"
pytest-cov = "^5.0.0"
jsonschema = "^4.21.1"
pylint = "^3.2.7"
pylint-mccabe = "^0.1.3"
pylint-absolute-imports = "^1.1.0"
beautifulsoup4 = "^4.12.3"
httmock = "^1.4.0"
moto = "^5.0.13"
freezegun = "^1.4.0"
pytest-xdist = "^3.5.0"
fakeredis = "^2.23.5"
mypy = "^1.11.2"
pytest-flask = "^1.3.0"
pytest = "^8.3.2"
pytest-sugar = "^1.0.0"
responses = "^0.25.0"
types-simplejson = "^3.19.0.20240310"
types-requests = "^2.31.0.20240406"
types-redis = "^4.6.0.20240819"
types-PyYAML = "^6.0.12.20240808"
types-python-dateutil = "^2.9.0.20240821"
pytest-mock = "^3.12.0"
types-cachetools = "^5.3.0.7"
types-pytz = "^2024.1.0.20240417"
playwright = "^1.42.0"
black = "^24.2.0"
djlint = "^1.34.2"
ruff = "^0.7.0"
[tool.poetry.dependencies]
# update dependabot.yaml when adding new dependencies
python = "^3.12.6"
colorama = "^0.4.6"
flask = "^3.0.2"
flask-babel = "^4.0.0"
flask-login = "^0.6.3"
flask-wtf = "^1.2.1"
google-cloud-datastore = "^2.19.0"
grpcio = "^1.64.1"
gunicorn = "^23.0.0"
pika = "^1.3.2"
pyyaml = "^6.0.1"
requests = "^2.32.0"
sdc-cryptography = "^1.2.1"
structlog = "^24.1.0"
ua-parser = "^1.0.0"
blinker = "^1.7.0"
boto3 = "^1.34.151"
humanize = "^4.9.0"
flask-talisman = "^1.1.0"
marshmallow = "^3.21.3"
python-snappy = "^0.7.1"
google-cloud-storage = "^2.17.0"
jsonpointer = "^3.0"
redis = "^5.0.8"
flask-compress = "^1.14"
htmlmin = "^0.1.12"
coloredlogs = "^15.0.1"
uwsgi = "^2.0.24"
email-validator = "^2.1.2"
itsdangerous = "^2.1.2"
google-cloud-pubsub = "^2.23.0"
google-cloud-tasks = "^2.16.3"
simplejson = "^3.19.2"
markupsafe = "^3.0.1"
pdfkit = "^1.0.0"
ordered-set = "^4.1.0"
cachetools = "^5.3.0.7"
gevent = "^24.2.1"
babel = "==2.14.0" # Temporarily pinned - problem for translations found in v2.15.0, see: https://github.com/ONSdigital/eq-questionnaire-runner/pull/1384
wtforms = "==3.1.2" # Temporarily pinned - problem for breaking changes in v3.2.0, see: https://github.com/pallets-eco/wtforms/releases/tag/3.2.0
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py312"
include = ["*.py"]
line-length = 160
indent-width = 4
cache-dir = "~/.cache/ruff"
exclude = ["tests/*", "scripts/*"]
[tool.ruff.lint]
extend-ignore = [
"B024", # No abstract methods in abstract base class
"B027", # Non-abstract empty methods in abstract base classes
"B028",# No explicit keyword argument found
"B905", # zip() without an explicit strict= parameter
"RUF100", # Allow Unused blanket `noqa` directive
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF005", # Consider {expression} instead of concatenation
"RUF009", # Do not perform function call `lazy_gettext` in dataclass defaults
"RUF015", # Prefer `next(...)` over single element slice
"RUF010", # Use explicit conversion flag
"RUF001", # String contains ambiguous character
"ARG001", # Allow Unused function argument: `method_name`
"ARG002", # Unused method argument
"ARG004", # Unused static method argument: `kwargs
"N818", # Exception name should be named with an Error suffix
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # EM102 Exception must not use an f-string literal, assign to variable first
"UP032", # Use f-string instead of `format` call
"UP018", # Unnecessary {literal_type} call (rewrite as a literal)
"UP015", # Unnecessary open mode parameters
"UP007", # Use `X | Y` for type annotations
"UP009", # UTF-8 encoding declaration is unnecessary
"UP017", # Use `datetime.UTC` alias
"UP033", # Use @functools.cache instead of @functools.lru_cache(maxsize=None)
"UP037", # Remove quotes from type annotation
"UP038", # Use X | Y in {} call instead of (X, Y)
"UP035", # Import from {target} instead: {names}
"UP040", # Type alias {name} uses {type_alias_method} instead of the type keyword
"S105", # Possible hardcoded password assigned to: "{}"
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"C408", # Unnecessary `tuple` call (rewrite as a literal)
"C400", # Unnecessary generator (rewrite as a `list` comprehension)
"N802", # Function name {name} should be lowercase
"I001", # Import block is un-sorted or un-formatted
"FBT001", # Boolean-typed keyword argument in function definition
"FBT002", # Boolean-typed positional argument in function definition
"FBT003", # Boolean positional value in function call
"COM812", # Trailing comma missing
"G004", # Logging statement uses f-string
"PIE810", # Call {attr} once with a tuple
"PIE800", # Unnecessary spread **
"SLF001", # Private member accessed: {access}
"TRY003", # Avoid specifying long messages outside the exception class
"TRY400", # Use logging.exception instead of logging.error
"TRY201", # Avoid using `raise Exception` without specifying an exception class
"TRY300", # Consider moving this statement to an `else` block
"PERF401", # Use a list comprehension to create a transformed list
"RET501", # Do not explicitly `return None` in function if it is the only possible return value
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
"RET504", # Unnecessary assignment to `context` before `return` statement
]
extend-select = [
"E4", "E7", "E9", "E5", # On top of the defaults (`E4`, E7`, `E9`, and `F`), enable E5 (Adds line length check - error "E501")
"Q", # flake8-quotes (Q)
"B", # flake8-bugbear (B)
"A", # flake8-builtins (A)
"C4", # flake8-comprehensions (C4)
"PIE", # flake8-pie (PIE)
"SLF", # flake8-self (SLF)
"ARG", # flake8-unused-arguments (ARG)
"YTT", # flake8-2020 (YTT)
"C", # flake8-comprehensions (C)
"DTZ", # flake8-datetimez (DTZ)
"S", # flake8-bandit (S)
"TID", # flake8-tidy-imports (TID)
"ICN", # flake8-import-conventions (ICN)
"ISC", # flake8-implicit-str-concat (ISC)
"COM", # flake8-commas (COM)
"LOG", # flake8-logging (LOG)
"G", # flake8-logging-format (G)
"EM", # flake8-errmsg (EM)
"FBT", # flake8-boolean-trap (FBT)
"TD", # flake8-todo (TD)
"FA", # flake8-future-annotations (FA)
"T20", # flake8-print (T20)
"RET", # flake8-return (RET)
"E", # pycodestyle Error (E)
"W", # pycodestyle Warning (W)
"F", # pyflakes (F)
"I", # isort (I)
"N", # pep8-naming (N)
"RUF", # Ruff-specific rules (RUF)
"UP", # pyupgrade (UP)
"ERA", # eradicate (ERA)
"FURB", # refurb (FURB)
"TRY", # tryceratops (TRY)
"FLY", # flynt (FLY)
"PERF", # Perflint (PERF)
]
[tool.ruff.lint.isort]
case-sensitive = true