Skip to content

Commit

Permalink
fix(factory): unwrap config to avoid tomlkit instances
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Sep 18, 2022
1 parent 743e09c commit e091fcf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/poetry/core/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_poetry(
from poetry.core.pyproject.toml import PyProjectTOML

poetry_file = self.locate(cwd)
local_config = PyProjectTOML(path=poetry_file).poetry_config
local_config = PyProjectTOML(path=poetry_file).poetry_config.unwrap()

# Checking validity
check_result = self.validate(local_config)
Expand All @@ -55,11 +55,7 @@ def create_poetry(
raise RuntimeError("The Poetry configuration is invalid:\n" + message)

# Load package
name = local_config["name"]
assert isinstance(name, str)
version = local_config["version"]
assert isinstance(version, str)
package = self.get_package(name, version)
package = self.get_package(local_config["name"], local_config["version"])
package = self.configure_package(
package, local_config, poetry_file.parent, with_groups=with_groups
)
Expand Down

0 comments on commit e091fcf

Please sign in to comment.