From eaa9da3c44b6beecc78a6c41504b3c912c1a95cc Mon Sep 17 00:00:00 2001 From: Jan Sander <63044278+JanhSander@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:46:30 +0100 Subject: [PATCH] Fixing Mypy issue --- src/datadoc/backend/dapla_dataset_path_info.py | 4 ++-- ... => person2_testdata_p2021-12-31_p2021-12-31_v1__DOC.json} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename tests/resources/klargjorte_data/befolkning/{person_testdata_p2021-12-31_p2021-12-31_v1__DOC.json => person2_testdata_p2021-12-31_p2021-12-31_v1__DOC.json} (100%) diff --git a/src/datadoc/backend/dapla_dataset_path_info.py b/src/datadoc/backend/dapla_dataset_path_info.py index b24284bd..4ab7f556 100644 --- a/src/datadoc/backend/dapla_dataset_path_info.py +++ b/src/datadoc/backend/dapla_dataset_path_info.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: import datetime + import os @dataclass @@ -254,8 +255,7 @@ def convert_ssb_period( class DaplaDatasetPathInfo: """Extract info from a path following SSB's dataset naming convention.""" - # def __init__(self, dataset_path: str | os.PathLike[str]) -> None: - def __init__(self, dataset_path: str) -> None: + def __init__(self, dataset_path: str | os.PathLike[str]) -> None: """Digest the path so that it's ready for further parsing.""" self.dataset_path = pathlib.Path(dataset_path) self.dataset_name_sections = self.dataset_path.stem.split("_") diff --git a/tests/resources/klargjorte_data/befolkning/person_testdata_p2021-12-31_p2021-12-31_v1__DOC.json b/tests/resources/klargjorte_data/befolkning/person2_testdata_p2021-12-31_p2021-12-31_v1__DOC.json similarity index 100% rename from tests/resources/klargjorte_data/befolkning/person_testdata_p2021-12-31_p2021-12-31_v1__DOC.json rename to tests/resources/klargjorte_data/befolkning/person2_testdata_p2021-12-31_p2021-12-31_v1__DOC.json