Skip to content

Commit a134274

Browse files
committed
Fix errors
1 parent 2a29d6b commit a134274

File tree

1 file changed

+5
-3
lines changed
  • backend/src/hatchling/metadata

1 file changed

+5
-3
lines changed

backend/src/hatchling/metadata/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import sys
55
from contextlib import suppress
66
from copy import deepcopy
7-
from typing import TYPE_CHECKING, Any, Generic, cast
87
from functools import cached_property
8+
from typing import TYPE_CHECKING, Any, Generic, cast
99

1010
from hatchling.metadata.utils import (
1111
format_dependency,
@@ -100,7 +100,7 @@ def core_raw_metadata(self) -> dict[str, Any]:
100100
@cached_property
101101
def dynamic(self) -> list[str]:
102102
# Here we maintain a copy of the dynamic fields from `self.core raw metadata`.
103-
# This property should never be mutated. In contrast, the fields in
103+
# This property should never be mutated. In contrast, the fields in
104104
# `self.core.dynamic` are depopulated on the first evaulation of `self.core`
105105
# or `self.version` as the actual values are computed.
106106
dynamic = self.core_raw_metadata.get('dynamic', [])
@@ -391,7 +391,7 @@ def name(self) -> str:
391391
return normalize_project_name(self.raw_name)
392392

393393
@cached_property
394-
def version(self) -> str:
394+
def version(self) -> str | None:
395395
"""
396396
https://peps.python.org/pep-0621/#version
397397
"""
@@ -404,6 +404,7 @@ def version(self) -> str:
404404
'if `version` is in field `project.dynamic`'
405405
)
406406
raise ValueError(message)
407+
return None
407408
else:
408409
if 'version' in self.dynamic:
409410
message = (
@@ -901,6 +902,7 @@ def classifiers(self) -> list[str]:
901902
verify_classifiers = not os.environ.get('HATCH_METADATA_CLASSIFIERS_NO_VERIFY')
902903
if verify_classifiers:
903904
import bisect
905+
904906
import trove_classifiers
905907

906908
known_classifiers = trove_classifiers.classifiers | self._extra_classifiers

0 commit comments

Comments
 (0)