Skip to content

maint: convert to cached_property and other minor refactors #1870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions backend/src/hatchling/cli/version/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ def version_impl(
plugin_manager = PluginManager()
metadata = ProjectMetadata(root, plugin_manager)

if 'version' in metadata.config.get('project', {}):
static_version = metadata.core.version
if static_version is not None:
if desired_version:
app.abort('Cannot set version when it is statically defined by the `project.version` field')
else:
app.display(metadata.core.version)
app.display(static_version)
return

source = metadata.hatch.version.source
Expand Down
Loading
Loading