Skip to content

Commit 2975b3b

Browse files
committed
MAINT: fixes to comply with pyproject-metadata 0.9.0 type annotations
1 parent 2004edc commit 2975b3b

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
@@ -246,7 +246,7 @@ def _validate_name(name: str) -> str:
246246
return name
247247

248248
@classmethod
249-
def from_pyproject(
249+
def from_pyproject( # type: ignore[override]
250250
cls,
251251
data: Mapping[str, Any],
252252
project_dir: Path = os.path.curdir,
@@ -367,7 +367,7 @@ def _libs_dir(self) -> str:
367367
@property
368368
def _license_file(self) -> Optional[pathlib.Path]:
369369
license_ = self._metadata.license
370-
if license_:
370+
if license_ and isinstance(license_, pyproject_metadata.License):
371371
return license_.file
372372
return None
373373

0 commit comments

Comments
 (0)