Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2022
1 parent 5eca5d2 commit 93f7187
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
12 changes: 2 additions & 10 deletions src/poetry/core/masonry/builders/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ def __init__(
if not isinstance(formats, list):
formats = [formats]

if (
formats
and self.format
and self.format not in formats
):
if formats and self.format and self.format not in formats:
continue

packages.append(p)
Expand All @@ -71,11 +67,7 @@ def __init__(
for include in self._package.include:
formats = include.get("format", [])

if (
formats
and self.format
and self.format not in formats
):
if formats and self.format and self.format not in formats:
continue

includes.append(include)
Expand Down
8 changes: 5 additions & 3 deletions src/poetry/core/masonry/builders/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from pprint import pformat
from tarfile import TarInfo
from typing import TYPE_CHECKING
from typing import Iterator
from typing import Dict
from typing import Iterator
from typing import List
from typing import Optional
from typing import Set
Expand Down Expand Up @@ -63,7 +63,7 @@ def __init__(
self,
poetry: "Poetry",
executable: Optional[Path] = None,
target_dir: Optional[Path] = None
target_dir: Optional[Path] = None,
) -> None:
super().__init__(poetry, executable=executable)
self._target_dir = target_dir
Expand Down Expand Up @@ -243,7 +243,9 @@ def setup_py(self) -> Iterator[Path]:
def build_pkg_info(self) -> bytes:
return self.get_metadata_content().encode()

def find_packages(self, include: "PackageInclude") -> Tuple[Optional[str], List[str], Dict[str, List[str]]]:
def find_packages(
self, include: "PackageInclude"
) -> Tuple[Optional[str], List[str], Dict[str, List[str]]]:
"""
Discover subpackages and data.
Expand Down

0 comments on commit 93f7187

Please sign in to comment.