Skip to content

Commit

Permalink
CU-8694pey4u: fix mypy issues
Browse files Browse the repository at this point in the history
CU-8694pey4u: add type hints
  • Loading branch information
tomolopolis committed May 30, 2024
1 parent f836f65 commit e1a34ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions medcat/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def load_model_pack(cls,
model_pack_path = cls.attempt_unpack(zip_path)

# Load the CDB
cdb = cls.load_cdb(model_pack_path)
cdb: CDB = cls.load_cdb(model_pack_path)

# load config
config_path = os.path.join(model_pack_path, "config.json")
Expand All @@ -417,7 +417,7 @@ def load_model_pack(cls,
addl_ner.append(trf)

# Find metacat models in the model_pack
meta_cats = []
meta_cats: List[MetaCAT] = []
if load_meta_models:
meta_cats = [mc[1] for mc in cls.load_meta_cats(model_pack_path)]

Expand Down Expand Up @@ -450,7 +450,7 @@ def load_cdb(cls, model_pack_path: str) -> CDB:
return cdb

@classmethod
def load_meta_cats(cls, model_pack_path: str, meta_cat_config_dict: Optional[Dict] = None) -> List[tuple(str, MetaCAT)]:
def load_meta_cats(cls, model_pack_path: str, meta_cat_config_dict: Optional[Dict] = None) -> List[tuple[str, MetaCAT]]:
"""
Args:
Expand Down

0 comments on commit e1a34ab

Please sign in to comment.