Skip to content

Commit

Permalink
make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
reyammer committed Feb 14, 2024
1 parent 4534f8e commit 9742557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/magika/magika.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_default_model_name() -> str:
print help, etc.) without the need to instantiate a Magika object.
"""

return Magika._get_magika_config()["default_model_name"]
return str(Magika._get_magika_config()["default_model_name"])

def get_model_name(self) -> str:
return self._model_dir.name
Expand All @@ -155,7 +155,7 @@ def _init_onnx_session(self) -> rt.InferenceSession:
@staticmethod
def _get_magika_config() -> Dict[str, Any]:
config_path = Path(__file__).parent / "config" / "magika_config.json"
return json.loads(config_path.read_text())
return json.loads(config_path.read_text()) # type: ignore[no-any-return]

def _get_outputs_from_paths(self, paths: List[Path]) -> List[MagikaOutput]:
"""Given a list of paths, returns a list of predictions. Each prediction
Expand Down

0 comments on commit 9742557

Please sign in to comment.