Skip to content

Commit 46bc228

Browse files
committed
πŸ§‘β€πŸ’» Switch python linter to ruff
1 parent ced295a commit 46bc228

File tree

8 files changed

+8
-19
lines changed

8 files changed

+8
-19
lines changed

β€Ž.pre-commit-config.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
repos:
2-
- repo: https://github.com/pycqa/isort
3-
rev: 5.12.0
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.6.9
44
hooks:
5-
- id: isort
6-
- repo: https://github.com/psf/black
7-
rev: "22.12.0" # Replace by any tag/version: https://github.com/psf/black/tags
8-
hooks:
9-
- id: black
10-
language_version: python3 # Should be a command that runs python3.6+
11-
- repo: https://github.com/pycqa/flake8
12-
rev: "5.0.4" # pick a git hash / tag to point to
13-
hooks:
14-
- id: flake8
15-
exclude: ^.*/migrations/.*$
5+
- id: ruff
6+
args: [--fix]
7+
- id: ruff-format
8+
169
- repo: https://github.com/Riverside-Healthcare/djLint
1710
rev: v1.19.12
1811
hooks:
@@ -27,6 +20,7 @@ repos:
2720
language: node
2821
files: ^.*\.tsx?$ # *.ts and *.tsx
2922
pass_filenames: true
23+
3024
- id: eslint
3125
name: eslint
3226
entry: eslint

β€Žmanage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/nix/store/xiqq153qcphzi6hcdd0wpk4sgj2h2iac-python3-3.10.9/bin/python
22
"""Django's command-line utility for administrative tasks."""
3+
34
import os
45
import sys
56

β€Žpresign/base/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919

2020
class Migration(migrations.Migration):
21-
2221
initial = True
2322

2423
dependencies = [

β€Žpresign/base/migrations/0002_event_email_textsstore.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Migration(migrations.Migration):
8-
98
dependencies = [
109
("base", "0001_initial"),
1110
]

β€Žpresign/base/migrations/0003_alter_event_lock_date_alter_event_signup_end_and_more.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
class Migration(migrations.Migration):
9-
109
dependencies = [
1110
("base", "0002_event_email_textsstore"),
1211
]

β€Žpresign/control/middleware.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def _login_redirect(self, request):
1616
return redirect_to_login(request.get_full_path())
1717

1818
def __call__(self, request):
19-
2019
url = resolve(request.path_info)
2120
request.resolved_path = url
2221

β€Žpresign/signup/forms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def __init__(
2929
question_block: QuestionBlock,
3030
**kwargs,
3131
):
32-
3332
self.question_block = question_block
3433
self.form_title = question_block.name
3534

β€Žpresign/signup/middleware.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def __init__(self, get_response=None):
1212
self.get_response = get_response
1313

1414
def __call__(self, request):
15-
1615
url = resolve(request.path_info)
1716
request.resolved_path = url
1817

0 commit comments

Comments
Β (0)