Skip to content

Commit

Permalink
Adding Pycln QA tool to the pre-commit config (#5234)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadialqattan authored May 17, 2022
1 parent 7db3e07 commit d0aa6e8
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 5 deletions.
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"]
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"]
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"]
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"]
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"]
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"]
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


packages = [
Expand Down

0 comments on commit d0aa6e8

Please sign in to comment.