From dbcd1de4de836434aee3b3aafe1ca1b849841bdc Mon Sep 17 00:00:00 2001 From: Tiexin Guo Date: Mon, 24 Jun 2024 18:06:07 +0800 Subject: [PATCH] chore: refactor after review --- interface_tester/collector.py | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface_tester/collector.py b/interface_tester/collector.py index bd76873..5ef08b3 100644 --- a/interface_tester/collector.py +++ b/interface_tester/collector.py @@ -61,7 +61,7 @@ def __hash__(self): return hash((self.name, self.url, self.branch)) -class _CharmsDotYamlSpec(TypedDict): +class _InterfacesDotYamlSpec(TypedDict): """Specification of the `interface.yaml` file each interface/version dir should contain.""" providers: List[_CharmTestConfig] @@ -152,8 +152,8 @@ def get_schemas(file: Path) -> Dict[Literal["requirer", "provider"], Type[DataBa return out -def _gather_charms_for_version(version_dir: Path) -> Optional[_CharmsDotYamlSpec]: - """Attempt to read the `interface.yaml` for this version sudir. +def _gather_charms_for_version(version_dir: Path) -> Optional[_InterfacesDotYamlSpec]: + """Attempt to read the `interface.yaml` for this version_dir. On failure, return None. """ @@ -196,7 +196,7 @@ def _gather_charms_for_version(version_dir: Path) -> Optional[_CharmsDotYamlSpec continue destination.append(cfg) - spec: _CharmsDotYamlSpec = {"providers": provider_configs, "requirers": requirer_configs} + spec: _InterfacesDotYamlSpec = {"providers": provider_configs, "requirers": requirer_configs} return spec diff --git a/pyproject.toml b/pyproject.toml index d06c1c2..d9a5404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta" [project] name = "pytest-interface-tester" -version = "2.0.1" +version = "3.0.0" authors = [ { name = "Pietro Pasotti", email = "pietro.pasotti@canonical.com" }, ]