Skip to content

Commit

Permalink
style: resolve mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Oct 8, 2023
1 parent 078bde5 commit fd4e7f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion therapy/etl/drugsatfda.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def get_latest_version(self) -> str:
raise DownloadException(msg)
return date
else:
raise requests.HTTPError("Unable to retrieve version from FDA API")
raise requests.HTTPError(
"Unable to retrieve version from FDA API", response=requests.Response()
)

def _load_meta(self) -> None:
"""Add Drugs@FDA metadata."""
Expand Down
10 changes: 6 additions & 4 deletions therapy/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ga4gh.vrsatile.pydantic import return_value
from ga4gh.vrsatile.pydantic.vrs_models import CURIE
from ga4gh.vrsatile.pydantic.vrsatile_models import ValueObjectDescriptor
from pydantic import BaseModel, StrictBool, validator
from pydantic import BaseModel, StrictBool, StrictStr, validator

from therapy.version import __version__

Expand Down Expand Up @@ -395,10 +395,12 @@ class TherapyDescriptor(ValueObjectDescriptor):
class ServiceMeta(BaseModel):
"""Metadata regarding the therapy-normalization service."""

name = "thera-py"
version = __version__
name: Literal["thera-py"] = "thera-py"
version: StrictStr = __version__
response_datetime: datetime
url = "https://github.com/cancervariants/therapy-normalization"
url: Literal[
"https://github.com/cancervariants/therapy-normalization"
] = "https://github.com/cancervariants/therapy-normalization"

class Config:
"""Configure OpenAPI schema"""
Expand Down

0 comments on commit fd4e7f1

Please sign in to comment.