Skip to content

Commit ff410db

Browse files
authored
Merge pull request #1375 from Open-Source-Legal/fix/lint-errors
Fix remaining lint errors on main
2 parents d9709c4 + bd6bd46 commit ff410db

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

frontend/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ node_modules/
1313
# Generated files
1414
*.min.js
1515
*.min.css
16+
public/env-config.js
1617

1718
# Playwright cache
1819
playwright/.cache/

opencontractserver/documents/management/commands/validate_v3_migration.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"""
1010

1111
import logging
12+
from typing import cast
1213

1314
from django.core.management.base import BaseCommand
1415
from django.db.models import Count
@@ -298,9 +299,14 @@ def _check_structural_set_uniqueness(self, verbose):
298299
)
299300

300301
if verbose:
301-
for content_hash, count in duplicates.values_list(
302-
"content_hash", "count"
303-
)[:5]:
302+
# django-stubs 6.0.3 mistypes `.values().annotate().values_list()`
303+
# chains as the annotated model rather than a tuple iterable, so
304+
# materialise with an explicit cast. Functionally identical.
305+
top_duplicates = cast(
306+
list[tuple[str, int]],
307+
list(duplicates.values_list("content_hash", "count")[:5]),
308+
)
309+
for content_hash, count in top_duplicates:
304310
self.stdout.write(
305311
f" - Hash {content_hash[:16]}...: {count} duplicates"
306312
)

0 commit comments

Comments
 (0)