Skip to content

Commit

Permalink
Merge pull request #1207 from dandi/fix-typing
Browse files Browse the repository at this point in the history
Fix type errors; unbound mypy
  • Loading branch information
yarikoptic committed Feb 7, 2023
2 parents 67f015c + 9095ddc commit 4341976
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def extract_sex(metadata: dict) -> Optional[models.SexType]:
]


@lru_cache(maxsize=None)
@lru_cache(maxsize=None) # type: ignore[arg-type]
@tenacity.retry(
reraise=True,
stop=tenacity.stop_after_attempt(3),
Expand Down Expand Up @@ -564,7 +564,9 @@ def extract_species(metadata: dict) -> Optional[models.SpeciesType]:
value_id = value_orig
lookup = ("rdfs:label", "oboInOwl:hasExactSynonym")
try:
result = parse_purlobourl(value_orig, lookup=lookup)
result: Optional[Dict[str, str]] = parse_purlobourl(
value_orig, lookup=lookup
)
except ConnectionError:
value = None
else:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ commands =

[testenv:typing]
deps =
mypy~=0.900
mypy
types-appdirs
types-python-dateutil
types-requests
Expand Down

0 comments on commit 4341976

Please sign in to comment.