Skip to content

Commit

Permalink
Fixed tiangolo#21
Browse files Browse the repository at this point in the history
Refactoring `if-if` statements

Assignment Expressions via `:=`
  • Loading branch information
Anselmoo committed Jul 11, 2023
1 parent d387baa commit d6c99d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions poetry_version_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def activate(self, poetry: Poetry, io: IO) -> None:
io.write_error_line(message)
raise RuntimeError(message)
if version_source == "init":
packages = poetry.local_config.get("packages")
if packages:
if packages := poetry.local_config.get("packages"):
if len(packages) == 1:
package_name = packages[0]["include"]
else:
Expand Down

0 comments on commit d6c99d9

Please sign in to comment.