File tree 9 files changed +99
-8
lines changed
9 files changed +99
-8
lines changed Original file line number Diff line number Diff line change 1
1
# format YAML files (remove whitespace)
2
2
3
3
7ba06e990ff66aadb422e3dba3edbbbcb9bdf970
4
+
5
+ # Apply ruff fixes for E + F
6
+ 39b04db835afdc2086ff433b0a2694ccd254dd74
Original file line number Diff line number Diff line change 94
94
ports :
95
95
- 5432:5432
96
96
# Needed because the postgres container does not provide a healthcheck
97
- options :
98
- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
97
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
99
98
100
99
steps :
101
100
- uses : actions/checkout@v3
@@ -135,6 +134,22 @@ jobs:
135
134
- name : Run Prettier
136
135
run : |
137
136
npm run check-linting
137
+
138
+ ruff :
139
+ name : Lint code with ruff
140
+ runs-on : ubuntu-latest
141
+
142
+ steps :
143
+ - uses : actions/checkout@v4
144
+ - name : Install Python
145
+ uses : actions/setup-python@v5
146
+ with :
147
+ python-version : ' 3.11'
148
+ - name : Install dependencies
149
+ run : grep ^ruff requirements/ci.txt | pip install -r /dev/stdin
150
+ - name : Run ruff on all files
151
+ run : ruff check -e --output-format=github src
152
+
138
153
bandit :
139
154
name : Python security check using Bandit
140
155
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -1004,6 +1004,8 @@ ruamel-yaml-clib==0.2.12
1004
1004
# -c requirements/base.txt
1005
1005
# -r requirements/base.txt
1006
1006
# ruamel-yaml
1007
+ ruff==0.9.6
1008
+ # via -r requirements/test-tools.in
1007
1009
sentry-sdk[django]==2.19.2
1008
1010
# via
1009
1011
# -c requirements/base.txt
Original file line number Diff line number Diff line change @@ -1158,6 +1158,10 @@ ruamel-yaml-clib==0.2.12
1158
1158
# -c requirements/ci.txt
1159
1159
# -r requirements/ci.txt
1160
1160
# ruamel-yaml
1161
+ ruff==0.9.6
1162
+ # via
1163
+ # -c requirements/ci.txt
1164
+ # -r requirements/ci.txt
1161
1165
sentry-sdk[django]==2.19.2
1162
1166
# via
1163
1167
# -c requirements/ci.txt
Original file line number Diff line number Diff line change 18
18
isort
19
19
flake8
20
20
autoflake
21
+ ruff
21
22
22
23
# DigidLocal
23
24
pyopenssl
Original file line number Diff line number Diff line change
1
+ # Exclude a variety of commonly ignored directories.
2
+ exclude = [
3
+ " .bzr" ,
4
+ " .direnv" ,
5
+ " .eggs" ,
6
+ " .git" ,
7
+ " .git-rewrite" ,
8
+ " .hg" ,
9
+ " .ipynb_checkpoints" ,
10
+ " .mypy_cache" ,
11
+ " .nox" ,
12
+ " .pants.d" ,
13
+ " .pyenv" ,
14
+ " .pytest_cache" ,
15
+ " .pytype" ,
16
+ " .ruff_cache" ,
17
+ " .svn" ,
18
+ " .tox" ,
19
+ " .venv" ,
20
+ " .vscode" ,
21
+ " __pypackages__" ,
22
+ " _build" ,
23
+ " buck-out" ,
24
+ " build" ,
25
+ " dist" ,
26
+ " node_modules" ,
27
+ " site-packages" ,
28
+ " venv" ,
29
+ " env" ,
30
+ ]
31
+
32
+ # Same as Black.
33
+ line-length = 88
34
+ indent-width = 4
35
+
36
+ # Assume Python 3.11
37
+ target-version = " py311"
38
+
39
+ [lint ]
40
+ select = [
41
+ # https://docs.astral.sh/ruff/rules/#error-e
42
+ " E" ,
43
+ # https://docs.astral.sh/ruff/rules/#pyflakes-f
44
+ " F" ,
45
+ ]
46
+ ignore = [
47
+ # Whitespace before ':' (conflicts with Black)
48
+ " E203" ,
49
+ # Two spaces before inline comment
50
+ " E261" ,
51
+ # Line too long
52
+ " E501" ,
53
+ # Do not assign a lambda expression
54
+ " E731" ,
55
+ # Name may be undefined from '*' import
56
+ " F405" ,
57
+ # Local variable is assigned but never used
58
+ " F841" ,
59
+ # Ambiguous variable name
60
+ " E741" ,
61
+ ]
62
+
63
+
64
+ # Allow fix for all enabled rules (when `--fix`) is provided.
65
+ fixable = [" ALL" ]
66
+ unfixable = []
67
+
68
+ # Allow unused variables when underscore-prefixed.
69
+ dummy-variable-rgx = " ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
Original file line number Diff line number Diff line change @@ -65,10 +65,8 @@ class AccountsConfig(AppConfig):
65
65
_has_run = False
66
66
67
67
def ready (self ):
68
- from .signals import ( # noqa:register the signals
69
- log_user_login ,
70
- log_user_logout ,
71
- )
68
+ # Register the signals upon app init
69
+ from .signals import log_user_login , log_user_logout # noqa:F401
72
70
73
71
if self ._has_run :
74
72
return
Original file line number Diff line number Diff line change 17
17
PLAYWRIGHT_MULTI_ONLY_DEFAULT = True
18
18
19
19
# Enable django-debug-toolbar
20
- from .dev import INSTALLED_APPS , MIDDLEWARE
20
+ from .dev import INSTALLED_APPS , MIDDLEWARE # noqa: E402
21
21
22
22
INSTALLED_APPS += ["debug_toolbar" ]
23
23
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware" ]
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ def test_create_persoon(client) -> None:
93
93
"digitaleAdressen" : None ,
94
94
"rekeningnummers" : None ,
95
95
"voorkeursRekeningnummer" : None ,
96
- "soortPartij" : "persoon" ,
97
96
"voorkeurstaal" : "nld" ,
98
97
"indicatieActief" : True ,
99
98
"indicatieGeheimhouding" : False ,
You can’t perform that action at this time.
0 commit comments