Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ repos:
args: [--py37-plus]
exclude: ^(install|get)-poetry.py$

- repo: https://github.com/hadialqattan/pycln
rev: v1.3.2
hooks:
- id: pycln
args: [--all]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
Expand Down
3 changes: 3 additions & 0 deletions src/poetry/installation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations

from poetry.installation.installer import Installer


__all__ = ["Installer"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

2 changes: 0 additions & 2 deletions src/poetry/installation/operations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import annotations

from typing import Union

from poetry.installation.operations.install import Install
from poetry.installation.operations.uninstall import Uninstall
from poetry.installation.operations.update import Update
Expand Down
3 changes: 3 additions & 0 deletions src/poetry/masonry/builders/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations

from poetry.masonry.builders.editable import EditableBuilder


__all__ = ["EditableBuilder"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

3 changes: 3 additions & 0 deletions src/poetry/mixology/solutions/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
from poetry.mixology.solutions.providers.python_requirement_solution_provider import (
PythonRequirementSolutionProvider,
)


__all__ = ["PythonRequirementSolutionProvider"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

3 changes: 3 additions & 0 deletions src/poetry/mixology/solutions/solutions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
from poetry.mixology.solutions.solutions.python_requirement_solution import (
PythonRequirementSolution,
)


__all__ = ["PythonRequirementSolution"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

3 changes: 3 additions & 0 deletions src/poetry/publishing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations

from poetry.publishing.publisher import Publisher


__all__ = ["Publisher"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

3 changes: 3 additions & 0 deletions src/poetry/puzzle/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations

from poetry.puzzle.solver import Solver


__all__ = ["Solver"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)

4 changes: 2 additions & 2 deletions tests/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@


try:
import zipp
import zipp # nopycln: import
except ImportError:
import zipfile as zipp # noqa: F401, TC002

try:
from typing import Protocol
from typing import Protocol # nopycln: import
except ImportError:
from typing_extensions import Protocol # noqa: F401, TC002

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/fixtures/setups/pendulum/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from distutils.core import setup

from build import *
from build import * # nopycln: import

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# nopycln: import can be replaced with # noqa if you prefer that.



packages = [
Expand Down