Skip to content

Commit 82867b6

Browse files
authored
Update pre commit dependencies (#1530)
* Update pre-commit dependencies * Remove flake8-copyright as not compatible with flake8==6.0.0 Waiting for savoirfairelinux/flake8-copyright#20 to be merged * Automatically format files with pre-commit
1 parent f10b674 commit 82867b6

File tree

21 files changed

+5
-29
lines changed

21 files changed

+5
-29
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@ repos:
44
hooks:
55
- id: seed-isort-config
66
- repo: https://github.com/timothycrosley/isort
7-
rev: 5.10.1
7+
rev: 5.12.0
88
hooks:
99
- id: isort
1010
- repo: https://github.com/ambv/black
11-
rev: 22.10.0
11+
rev: 23.1.0
1212
hooks:
1313
- id: black
1414
- repo: https://github.com/pycqa/flake8
15-
rev: 5.0.4
15+
rev: 6.0.0
1616
hooks:
1717
- id: flake8
1818
additional_dependencies:
1919
- "flake8-coding==1.3.1"
20-
- "flake8-copyright==0.2.3"
2120
- "flake8-debugger==3.1.0"
2221
- "flake8-mypy==17.8.0"
2322
- repo: https://github.com/pre-commit/pre-commit-hooks
24-
rev: v4.3.0
23+
rev: v4.4.0
2524
hooks:
2625
- id: check-ast
2726
- id: check-docstring-first

backend/code_review_backend/issues/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ class IssueCheckHistory(CachedView, generics.ListAPIView):
301301
pagination_class = None
302302

303303
def get_queryset(self):
304-
305304
# Count all the issues per day
306305
queryset = (
307306
Issue.objects.annotate(date=TruncDate("created"))

backend/code_review_backend/issues/management/commands/load_issues.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def handle(self, *args, **options):
6363
)
6464

6565
for task_id, report in tasks:
66-
6766
# Build revision & diff
6867
revision, diff = self.build_revision_and_diff(report["revision"], task_id)
6968

@@ -118,7 +117,6 @@ def load_tasks(self, environment, chunk=200):
118117

119118
token = None
120119
while True:
121-
122120
query = {"limit": chunk}
123121
if token is not None:
124122
query["continuationToken"] = token
@@ -127,7 +125,6 @@ def load_tasks(self, environment, chunk=200):
127125
)
128126

129127
for task in data["tasks"]:
130-
131128
if not task["data"].get("issues"):
132129
continue
133130

@@ -137,7 +134,6 @@ def load_tasks(self, environment, chunk=200):
137134
artifact = json.load(open(path))
138135

139136
else:
140-
141137
# Download the task report
142138
logging.info(f"Download task {task['taskId']}")
143139
try:

backend/code_review_backend/issues/migrations/0001_initial.py

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

1414

1515
class Migration(migrations.Migration):
16-
1716
initial = True
1817

1918
dependencies = []

backend/code_review_backend/issues/migrations/0002_compare_issues.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def set_existing_as_new(apps, schema_editor):
3737

3838

3939
class Migration(migrations.Migration):
40-
4140
dependencies = [("issues", "0001_initial")]
4241

4342
operations = [

backend/code_review_backend/issues/migrations/0003_diff_repository.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def _create_diff_repos(apps, schema_editor):
4040

4141

4242
class Migration(migrations.Migration):
43-
4443
dependencies = [("issues", "0002_compare_issues")]
4544

4645
operations = [

backend/code_review_backend/issues/migrations/0004_issue_in_patch.py

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

1111

1212
class Migration(migrations.Migration):
13-
1413
dependencies = [("issues", "0003_diff_repository")]
1514

1615
operations = [

backend/code_review_backend/issues/migrations/0005_rename_check_issue_analyzer_check.py

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

1010

1111
class Migration(migrations.Migration):
12-
1312
dependencies = [
1413
("issues", "0004_issue_in_patch"),
1514
]

backend/code_review_backend/issues/migrations/0006_issuelink_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def clean_unlinked_issue(apps, schema_editor):
1818

1919

2020
class Migration(migrations.Migration):
21-
2221
dependencies = [
2322
("issues", "0005_rename_check_issue_analyzer_check"),
2423
]

backend/code_review_backend/issues/tests/commands/test_cleanup_issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def setUp(self):
5858
)
5959
]
6060
)
61-
for (rev, days_ago) in ((rev_1, 35), (rev_2, 15), (rev_3, 1)):
61+
for rev, days_ago in ((rev_1, 35), (rev_2, 15), (rev_3, 1)):
6262
rev.created = timezone.now() - timedelta(days=days_ago)
6363
rev.save(update_fields=["created"])
6464

0 commit comments

Comments
 (0)