Skip to content

Commit

Permalink
simplify typing
Browse files Browse the repository at this point in the history
- connsider `local_config["readme"]` as `str | Iterable[str]` in sdist
  • Loading branch information
wagnerluis1982 committed Oct 16, 2022
1 parent 8d82abb commit 78e1bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/poetry/core/masonry/builders/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 78e1bc4

Please sign in to comment.