From 15a788b2d0993ca0c3f6969836c83f844d00bbae Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Thu, 29 Feb 2024 13:15:27 +0100 Subject: [PATCH] Update src/poetry/console/commands/build.py Co-authored-by: Bartosz Sokorski --- src/poetry/console/commands/build.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/poetry/console/commands/build.py b/src/poetry/console/commands/build.py index b273a8f94b1..640c68d57e9 100644 --- a/src/poetry/console/commands/build.py +++ b/src/poetry/console/commands/build.py @@ -51,9 +51,7 @@ def _build( else: raise ValueError(f"Invalid format: {fmt}") - local_version_label = self.option("local-version") - - if local_version_label: + if local_version_label := self.option("local-version"): self.poetry.package.version = self.poetry.package.version.replace( local=local_version_label )