diff --git a/.github/workflows/mypy-check.yaml b/.github/workflows/mypy-check.yaml index 5166fe8..03d3426 100644 --- a/.github/workflows/mypy-check.yaml +++ b/.github/workflows/mypy-check.yaml @@ -34,4 +34,4 @@ jobs: - name: Run mypy run: | - mypy cells.py config.py configure.py documentation.py git_utils.py markdown_utils.py project.py rom.py shuttle.py --check-untyped-defs + mypy cells.py config.py configure.py documentation.py git_utils.py markdown_utils.py project.py project_info.py rom.py shuttle.py --check-untyped-defs diff --git a/project.py b/project.py index c6decbd..11766e5 100644 --- a/project.py +++ b/project.py @@ -105,7 +105,7 @@ class Project: yaml_path = os.path.join(self.local_dir, "info.yaml") try: with open(yaml_path) as fh: - self.info = ProjectInfo(yaml.safe_load(fh)) + self.info = ProjectInfo(yaml.safe_load(fh), self.get_tile_sizes()) except FileNotFoundError: logging.error( f"yaml file not found for {self} - do you need to --clone the project repos?" diff --git a/project_info.py b/project_info.py index 3e8e494..89735ec 100644 --- a/project_info.py +++ b/project_info.py @@ -1,7 +1,5 @@ from typing import Any, Dict, List, Optional -from tile_sizes import tile_sizes - YAML_VERSION = 6 @@ -46,7 +44,7 @@ class ProjectInfo: top_module: str source_files: List[str] - def __init__(self, yaml_data: Dict[str, Any]): + def __init__(self, yaml_data: Dict[str, Any], tile_sizes: Dict[str, str]): # Validate Version yaml_version = yaml_data.get("yaml_version") if yaml_version is None: diff --git a/tile_sizes.py b/tile_sizes.py deleted file mode 100644 index c59a350..0000000 --- a/tile_sizes.py +++ /dev/null @@ -1,7 +0,0 @@ -from os.path import dirname, join, realpath -from typing import Dict - -import yaml - -with open(join(dirname(realpath(__file__)), "tile_sizes.yaml")) as fh: - tile_sizes: Dict[str, str] = yaml.safe_load(fh)