Skip to content

Commit d9709c4

Browse files
authored
Merge pull request #1367 from Open-Source-Legal/fix/ci-mypy-django-stubs-sync
Fix Backend CI mypy failure from django-stubs 6.0.3 upgrade
2 parents 55b6185 + 41eb6ae commit d9709c4

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ repos:
6161
# major breakages (e.g. pypdf 7, openai 3) for the same reason.
6262
additional_dependencies:
6363
# --- Type stubs -----------------------------------------------
64-
- django-stubs==6.0.2
64+
- django-stubs==6.0.3
6565
- djangorestframework-stubs==3.16.9
6666
- types-requests==2.33.0.20260408
6767
- types-PyYAML==6.0.12.20260408

opencontractserver/documents/management/commands/validate_v3_migration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,11 @@ def _check_structural_set_uniqueness(self, verbose):
298298
)
299299

300300
if verbose:
301-
for dup in duplicates[:5]:
301+
for content_hash, count in duplicates.values_list(
302+
"content_hash", "count"
303+
)[:5]:
302304
self.stdout.write(
303-
f" - Hash {dup['content_hash'][:16]}...: {dup['count']} duplicates"
305+
f" - Hash {content_hash[:16]}...: {count} duplicates"
304306
)
305307

306308
return {"passed": False, "duplicate_hashes": duplicate_count}

0 commit comments

Comments
 (0)