You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ hatch build──────────────────────────────────────────────────────────────────────────────────────────────────────── sdist ────────────────────────────────────────────────────────────────────────────────────────────────────────Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/__main__.py", line 6, in <module> sys.exit(hatchling()) ^^^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/cli/__init__.py", line 26, in hatchling command(**kwargs) File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/cli/build/__init__.py", line 82, in build_impl for artifact in builder.build( File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 90, in build self.metadata.validate_fields() File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 265, in validate_fields _ = self.version ^^^^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 149, in version self._version = self._get_version() ^^^^^^^^^^^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 244, in _get_version core_metadata = self.core ^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 191, in core self._version = self._get_version(metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 248, in _get_version version = self.hatch.version.cached ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/kiyoon/Library/Application Support/hatch/env/virtual/ml-project/X6XZjsly/ml-project-build/lib/python3.11/site-packages/hatchling/metadata/core.py", line 1456, in cached raise type(e)(message) from NoneAttributeError: Error getting the version from source `code`: 'NoneType' object has no attribute '__dict__'. Did you mean: '_cached'?
The text was updated successfully, but these errors were encountered:
kiyoon
changed the title
Bug: Using "PEP 563 – Postponed Evaluation of Annotations" produces error with version code.
Bug: Using "PEP 563 – Postponed Evaluation of Annotations" in dataclasses produces error with version code.
Dec 20, 2024
And the
src/ml_project/_version.py
or, use constant string for lazy type evaluation
Produces error:
The text was updated successfully, but these errors were encountered: