Skip to content

Commit de0d617

Browse files
committed
fix: Fix handling of "format" in package includes initialization
Ensure that "format" is always processed as a list when initializing package includes. If not explicit set default to sdist and wheel.
1 parent 61081dd commit de0d617

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/poetry/core/masonry/utils/module.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ def __init__(
7272
packages = [default_package]
7373

7474
for package in packages:
75+
formats = package.get("format", ["sdist", "wheel"])
76+
if formats and not isinstance(formats, list):
77+
formats = [formats]
78+
7579
self._package_includes.append(
7680
PackageInclude(
7781
self._path,
7882
package["include"],
79-
formats=package["format"],
83+
formats=formats,
8084
source=package.get("from"),
8185
target=package.get("to"),
8286
)

0 commit comments

Comments
 (0)