Skip to content

Commit f497dc0

Browse files
committed
MAINT: fixes to comply with pyproject-metadata 0.9.0 type annotations
1 parent 577cf6d commit f497dc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def __init__(self, name: str, *args: Any, **kwargs: Any):
240240
super().__init__(name, *args, **kwargs)
241241

242242
@classmethod
243-
def from_pyproject(
243+
def from_pyproject( # type: ignore[override]
244244
cls,
245245
data: Mapping[str, Any],
246246
project_dir: Path = os.path.curdir,
@@ -345,7 +345,7 @@ def _libs_dir(self) -> str:
345345
@property
346346
def _license_file(self) -> Optional[pathlib.Path]:
347347
license_ = self._metadata.license
348-
if license_:
348+
if license_ and isinstance(license_, pyproject_metadata.License):
349349
return license_.file
350350
return None
351351

0 commit comments

Comments
 (0)