diff --git a/mesonpy/__init__.py b/mesonpy/__init__.py index b0ed1eac..476957c5 100644 --- a/mesonpy/__init__.py +++ b/mesonpy/__init__.py @@ -240,7 +240,7 @@ def __init__(self, name: str, *args: Any, **kwargs: Any): super().__init__(name, *args, **kwargs) @classmethod - def from_pyproject( + def from_pyproject( # type: ignore[override] cls, data: Mapping[str, Any], project_dir: Path = os.path.curdir, @@ -345,7 +345,7 @@ def _libs_dir(self) -> str: @property def _license_file(self) -> Optional[pathlib.Path]: license_ = self._metadata.license - if license_: + if license_ and isinstance(license_, pyproject_metadata.License): return license_.file return None