Skip to content

Commit 3f99f81

Browse files
committed
more fixes in pyproject-metadata 0.8.0
1 parent 9cc7078 commit 3f99f81

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,14 @@ def __init__(self, name: str, *args: Any, **kwargs: Any):
242242
super().__init__(name, *args, **kwargs)
243243

244244
@classmethod
245-
def from_pyproject(cls, data: Mapping[str, Any], project_dir: Path) -> Metadata: # type: ignore[override]
246-
# The class method from the pyproject_metadata base class is not
247-
# typed in a subclassing friendly way, thus annotations to ignore
248-
# typing are needed.
249-
245+
def from_pyproject(cls, data: Mapping[str, Any], project_dir: Path) -> Self:
250246
metadata = super().from_pyproject(data, project_dir)
251-
252247
# Check for unsupported dynamic fields.
253248
unsupported_dynamic = set(metadata.dynamic) - {'version', }
254249
if unsupported_dynamic:
255250
fields = ', '.join(f'"{x}"' for x in unsupported_dynamic)
256251
raise pyproject_metadata.ConfigurationError(f'Unsupported dynamic fields: {fields}')
257-
258-
return metadata # type: ignore[return-value]
252+
return metadata
259253

260254
@property
261255
def distribution_name(self) -> str:

0 commit comments

Comments
 (0)