diff --git a/rddlrepository/core/info.py b/rddlrepository/core/info.py index e8918c4..f823548 100644 --- a/rddlrepository/core/info.py +++ b/rddlrepository/core/info.py @@ -1,7 +1,7 @@ import os.path import sys import importlib.util -from typing import Dict, List +from typing import Any, Dict, List from .error import ( RDDLRepoInstanceNotExistError, @@ -17,7 +17,7 @@ class ProblemInfo: - def __init__(self, problem_data: Dict) -> None: + def __init__(self, problem_data: Dict[str, Any]) -> None: self.name = problem_data['name'] self.desc = problem_data['description'] self.loc = problem_data['location'] diff --git a/rddlrepository/core/manager.py b/rddlrepository/core/manager.py index d4ceb00..5aca72b 100644 --- a/rddlrepository/core/manager.py +++ b/rddlrepository/core/manager.py @@ -3,7 +3,7 @@ import os import importlib import csv -from typing import Dict, List +from typing import Dict, List, Optional from .error import ( RDDLRepoDomainNotExistError, @@ -25,7 +25,7 @@ class RDDLRepoManager: - def __init__(self, rebuild=False) -> None: + def __init__(self, rebuild: bool=False) -> None: self.archiver_dict = {} self.archive_by_context = {} @@ -217,7 +217,7 @@ def register_context(self, context: str, refresh: bool=True) -> None: print(f'Context <{context}> was successfully registered in rddlrepository.') def register_domain(self, name: str, context: str, rddl: str, - desc: str=None, viz: str='', refresh: bool=True) -> None: + desc: Optional[str]=None, viz: str='', refresh: bool=True) -> None: domains = self.list_problems_by_context(context) if name in domains: raise RDDLRepoProblemDuplicationError(