Skip to content

Commit

Permalink
MAINT: fixes to comply with pyproject-metadata 0.9.0 type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolodi committed Oct 23, 2024
1 parent 577cf6d commit f497dc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f497dc0

Please sign in to comment.