Skip to content

Commit

Permalink
Type hint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-gimelfarb committed Jul 1, 2024
1 parent eef636e commit ba7d7ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rddlrepository/core/info.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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']
Expand Down
6 changes: 3 additions & 3 deletions rddlrepository/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = {}

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ba7d7ca

Please sign in to comment.