Skip to content

Commit

Permalink
fix: Fix handling of "format" in package includes initialization
Browse files Browse the repository at this point in the history
Ensure that "format" is always processed as a list when initializing package includes. If not explicit set default to sdist and wheel.
  • Loading branch information
finswimmer committed Jan 6, 2025
1 parent 61081dd commit de0d617
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/poetry/core/masonry/utils/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ def __init__(
packages = [default_package]

for package in packages:
formats = package.get("format", ["sdist", "wheel"])
if formats and not isinstance(formats, list):
formats = [formats]

self._package_includes.append(
PackageInclude(
self._path,
package["include"],
formats=package["format"],
formats=formats,
source=package.get("from"),
target=package.get("to"),
)
Expand Down

0 comments on commit de0d617

Please sign in to comment.