Skip to content

Commit 0666f23

Browse files
Fix: Resolve type checker error and add mypy_cache to gitignore
- Line 446: Replace 'key=transcript_lengths.get' with 'key=lambda tid: transcript_lengths[tid]' to resolve 'Argument key has incompatible type' type checker error - Add .mypy_cache to .gitignore to prevent type checking cache files from being staged
1 parent 6d1ce66 commit 0666f23

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.idea
22
.vscode
33
__pycache__
4+
.mypy_cache
45
*.pyc
56
dist
67
.venv/

malariagen_data/anoph/genome_features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def canonical_transcript(
443443
raise ValueError(f"Gene '{gene}' has no transcripts with exons")
444444

445445
# Find canonical (maximum length)
446-
canonical = max(transcript_lengths, key=transcript_lengths.get)
446+
canonical = max(transcript_lengths, key=lambda tid: transcript_lengths[tid])
447447
canonical_length = transcript_lengths[canonical]
448448
debug(f"Canonical transcript: {canonical} with {canonical_length} bp")
449449
return canonical

0 commit comments

Comments
 (0)