Skip to content

Commit e678453

Browse files
committed
MAINT: adjust typing annotations to pyproject-metadata 0.8.0
mypy is always run with the latest version of the dependencies.
1 parent a9ac054 commit e678453

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
@@ -248,7 +248,7 @@ def _validate_name(name: str) -> str:
248248
return name
249249

250250
@classmethod
251-
def from_pyproject(cls, data: Mapping[str, Any], project_dir: Path) -> Metadata: # type: ignore[override]
251+
def from_pyproject(cls, data: Mapping[str, Any], project_dir: Path) -> Self:
252252
# The class method from the pyproject_metadata base class is not
253253
# typed in a subclassing friendly way, thus annotations to ignore
254254
# typing are needed.
@@ -266,7 +266,7 @@ def from_pyproject(cls, data: Mapping[str, Any], project_dir: Path) -> Metadata:
266266
fields = ', '.join(f'"{x}"' for x in unsupported_dynamic)
267267
raise pyproject_metadata.ConfigurationError(f'Unsupported dynamic fields: {fields}')
268268

269-
return metadata # type: ignore[return-value]
269+
return metadata
270270

271271
# Local fix for a bug in pyproject-metadata. See
272272
# https://github.com/mesonbuild/meson-python/issues/454

0 commit comments

Comments
 (0)