From c6df4efac074805012372d8779631a0aa36cb9d4 Mon Sep 17 00:00:00 2001 From: Wagner Macedo Date: Sat, 1 Oct 2022 20:30:12 +0200 Subject: [PATCH] simplify typing - connsider `local_config["readme"]` as `str | Iterable[str]` in sdist --- src/poetry/core/masonry/builders/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poetry/core/masonry/builders/sdist.py b/src/poetry/core/masonry/builders/sdist.py index f7a10fe26..a43d01faa 100644 --- a/src/poetry/core/masonry/builders/sdist.py +++ b/src/poetry/core/masonry/builders/sdist.py @@ -333,8 +333,8 @@ def find_files_to_add(self, exclude_build: bool = False) -> set[BuildIncludeFile # add readme files if it is specified if "readme" in self._poetry.local_config: - r: str | Path | Iterable[str | Path] = self._poetry.local_config["readme"] - if isinstance(r, (str, Path)): + r: str | Iterable[str] = self._poetry.local_config["readme"] + if isinstance(r, str): additional_files.add(r) else: additional_files.update(r)