Skip to content

Commit c3048c4

Browse files
committed
Added the F Ruff rule
1 parent e402633 commit c3048c4

16 files changed

+17
-25
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ there do exist scenarios where *not* getting rid of a code smell would be the mo
677677
- [Translations only differing in case](#translations-only-differing-in-case)
678678
* [Python](#python-1)
679679
+ [For code in general](#for-code-in-general-4)
680-
- [Unused imports](#unused-imports)
681680
- [Unnecessary `print` statements](#unnecessary-print-statements)
682681
- [Variable, function or class names shadowing built-in or imported names](#variable-function-or-class-names-shadowing-built-in-or-imported-names)
683682
- [Exception clause is too broad](#exception-clause-is-too-broad)
@@ -797,10 +796,6 @@ the latter instance can be replaced by `capfirst(_("event"))` in Python code, an
797796

798797
### For code in general
799798

800-
#### Unused imports
801-
802-
Unused imports should be removed.
803-
804799
#### Unnecessary `print` statements
805800

806801
These should be removed,

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ format.docstring-code-format = true
6969

7070
lint.select = [
7171
"E", # flake8/pycodestyle (Error)
72+
"F", # flake8/Pyflakes
7273
]
7374

7475
# Disable line length check in migrations

src/contentbox/migrations/0008_contentbox_last_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 3.2.8 on 2021-10-25 18:28
22

3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from django.db import migrations, models
55

66

src/faq/migrations/0003_question_last_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 3.2.8 on 2021-10-25 18:28
22

3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from django.db import migrations, models
55

66

src/groups/migrations/0008_committee_and_inheritancegroup_last_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 3.2.8 on 2021-10-25 18:28
22

3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from django.db import migrations, models
55

66

src/internal/migrations/0012_member_and_systemaccess_last_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 3.2.8 on 2021-10-25 18:28
22

3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from django.db import migrations, models
55

66

src/internal/migrations/0015_member_gmail_and_MAKE_email_and_ntnu_starting_semester_and_github_and_discord_and_minecraft_username.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Generated by Django 3.1.2 on 2020-10-22 22:42
22

3-
import django.core.validators
43
from django.db import migrations, models
54
import internal.modelfields
65
import internal.validators
7-
import re
86
import web.modelfields
97

108

src/internal/migrations/0024_historicalmember_and_historicalmember_committees.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import internal.modelfields
99
import internal.validators
1010
import phonenumber_field.modelfields
11-
import re
1211
import simple_history.models
1312
import web.modelfields
1413

src/make_queue/migrations/0024_machine_and_machineusagerule_and_printer3dcourse_and_reservationrule_last_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 3.2.8 on 2021-10-26 01:43
22

3-
from datetime import datetime, timezone
3+
from datetime import datetime
44
from django.db import migrations, models
55

66

src/make_queue/tests/views/test_api_reservation_views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from django.test import Client, TestCase
88
from django.utils import timezone
99
from django.utils.dateparse import parse_time
10-
from django.utils.http import urlencode
1110
from django_hosts import reverse
1211

1312
from news.models import Event, TimePlace
@@ -395,7 +394,7 @@ def test_finishing_just_before_other_reservation_starts_succeeds(self, now_mock)
395394
start_time=self.now + timedelta(minutes=1),
396395
end_time=self.now + timedelta(hours=6),
397396
)
398-
reservation3 = Reservation.objects.create(
397+
Reservation.objects.create(
399398
machine=self.machine,
400399
user=User.objects.create_user("test2"),
401400
start_time=self.now + timedelta(hours=6),

0 commit comments

Comments
 (0)