Skip to content

Use flake8 type checking#4787

Merged
finswimmer merged 7 commits into
python-poetry:masterfrom
radoering:use-flake8-type-checking
Nov 18, 2021
Merged

Use flake8 type checking#4787
finswimmer merged 7 commits into
python-poetry:masterfrom
radoering:use-flake8-type-checking

Conversation

@radoering
Copy link
Copy Markdown
Member

Pull Request Check List

Relates-to: #4776

Copy link
Copy Markdown
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

Awesome! I like this a lot more than I even thought I would -- it really makes the usage of imports unambiguous.

A few corrections/nits to pick, and then also one question -- since upstream seems open to adding a whitelist, is it waiting so we can drop # noqa? The good news is when the whitelist is added, yesqa should automate removing those comments.

Alternatively, there is https://pypi.org/project/future-annotations/, but I'm not sure how it will interact with the rest of our tooling.

Comment thread .flake8 Outdated
Comment thread src/poetry/masonry/builders/__init__.py Outdated
@@ -1 +1 @@
from poetry.masonry.builders.editable import EditableBuilder
from poetry.masonry.builders.editable import EditableBuilder # noqa: TC002
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wondering if we should exempt __init__.py from TC002 like we do from F401 in .flake8.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure. Probably, suitable for most __init__.py files. However, some files like poetry/mixology/__init__.py should probably not be excluded. Maybe, the same applies to F401. 🤷‍♂️ I'll change it if you like.

Comment thread src/poetry/utils/password_manager.py Outdated
@radoering
Copy link
Copy Markdown
Member Author

A few corrections/nits to pick, and then also one question -- since upstream seems open to adding a whitelist, is it worth adding those so we can drop # noqa? The good news is when the whitelist is added, yesqa should automate removing those comments.

I'll try the whitelist as soon as it has been added upstream. That should remove a lot of # noqa.

@radoering radoering force-pushed the use-flake8-type-checking branch from e559301 to 1c8fb8b Compare November 18, 2021 11:03
Copy link
Copy Markdown
Member

@finswimmer finswimmer left a comment

Choose a reason for hiding this comment

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

Beautiful 😍

@finswimmer finswimmer merged commit 9e31f7a into python-poetry:master Nov 18, 2021
@github-actions
Copy link
Copy Markdown

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@radoering radoering deleted the use-flake8-type-checking branch November 24, 2024 12:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants