Repository navigation
Adding Pycln QA tool to the pre-commit config - #5234
Conversation
| #!/usr/bin/env python | ||
| # Learn more: https://github.com/kennethreitz/setup.py | ||
| import os | ||
| import re |
There was a problem hiding this comment.
Detected and removed by pycln.
| from distutils.core import setup | ||
|
|
||
| from build import * | ||
| from build import * # nopycln: import |
There was a problem hiding this comment.
# nopycln: import can be replaced with # noqa if you prefer that.
| @@ -1,5 +1,4 @@ | |||
| #!/usr/bin/env python | |||
| import io | |||
There was a problem hiding this comment.
Detected and removed by pycln.
| from poetry.repositories.repository import Repository | ||
|
|
||
|
|
||
| __all__ = ["Pool", "Repository"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| from poetry.puzzle.solver import Solver | ||
|
|
||
|
|
||
| __all__ = ["Solver"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| from poetry.publishing.publisher import Publisher | ||
|
|
||
|
|
||
| __all__ = ["Publisher"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| from poetry.packages.package_collection import PackageCollection | ||
|
|
||
|
|
||
| __all__ = ["DependencyPackage", "Locker"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| ) | ||
|
|
||
|
|
||
| __all__ = ["PythonRequirementSolution"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| ) | ||
|
|
||
|
|
||
| __all__ = ["PythonRequirementSolutionProvider"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| from poetry.masonry.builders.editable import EditableBuilder | ||
|
|
||
|
|
||
| __all__ = ["EditableBuilder"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
| from poetry.installation.installer import Installer | ||
|
|
||
|
|
||
| __all__ = ["Installer"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
branchv
left a comment
There was a problem hiding this comment.
thanks @hadialqattan! I'm a huge fan of this addition, and pycln. thanks for creating it 👏
I just have one question about the import you manually removed
Thank you for showing your interest in my tool, I appreciate that. The import statement that I've removed manually seems like it's not used anywhere in the project. |
| from poetry.packages.package_collection import PackageCollection | ||
|
|
||
|
|
||
| __all__ = ["DependencyPackage", "Locker", "PackageCollection"] |
There was a problem hiding this comment.
Why have I added __all__ dunder? __init__.py without __all__ (Pycln Docs)
|
I don't know why pre-commit is complaining about something has nothing todo with this PR: pyupgrade................................................................Failed
- hook id: pyupgrade
- exit code: 1
- files were modified by this hook
Rewriting tests/console/commands/test_run.py
Rewriting tests/console/commands/test_show.py |
Rebasing onto master should fix it now (see #5247) |
branchv
left a comment
There was a problem hiding this comment.
thanks @hadialqattan, this looks good to me. let's wait for more opinions
|
BTW, I have included a used by section in the README file containing a list of notable projects/organizations that use Pycln. |
|
@branchvincent A gentle ping... |
|
@hadialqattan Could you please merge changes from master? I will make sure the team takes a look at this ;) |
|
Hi @Secrus, sure, I'm gonna work on that as soon as possible. I'll let know you when the PR is ready to go. |
|
@Secrus I believe that the PR is ready now. |
|
@hadialqattan sorry for forgetting about this! If you're up for it, https://github.com/python-poetry/poetry-core would definitely benefit from this as well |
That sounds good.. I'm gonna open a PR there as soon as possible! |
|
@branchvincent it's ready PR360. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #5233
Why?
I found a comment from one of your maintainers/active contributors that say a PR adding Pycln to the pre-commit hooks is welcome.
This is the comment:
Also, I found Pycln a good addition to improve the code quality of Poetry, therefore I've created this PR.
BTW, I'm the author of Pycln.