Skip to content

Use flake8-eradicate - #4806

Merged
neersighted merged 1 commit into
python-poetry:masterfrom
radoering:use-flake8-eradicate
Nov 28, 2021
Merged

neersighted merged 1 commit into
python-poetry:masterfrom
radoering:use-flake8-eradicate

Conversation

@radoering

Copy link
Copy Markdown
Member

Relates-to: #4776

Very low hanging fruit, but perhaps too little benefit or maybe just an investment in the future.

There seems to be no commented out code in poetry (or eradicate can't find it).

eradicate only finds 5 false positives in this comment:

src/poetry/puzzle/provider.py:540:1: E800 Found commented out code
src/poetry/puzzle/provider.py:541:1: E800 Found commented out code
src/poetry/puzzle/provider.py:544:1: E800 Found commented out code
src/poetry/puzzle/provider.py:550:1: E800 Found commented out code
src/poetry/puzzle/provider.py:551:1: E800 Found commented out code

When extending the whitelist, you have to ask yourself how specific or general you want the regex to be.

@neersighted

Copy link
Copy Markdown
Member

It seems like it could be useful to aid code review and/or help prevent new contributors from having more things to fix on a PR. That being said, I haven't seen a lot of commented out code during review. Thoughts, @finswimmer and @abn?

@branchv

branchv commented Nov 20, 2021

Copy link
Copy Markdown
Member

it may be worth exploring other options for finding dead code, such as vulture or dead (both of which seem to find unused code here but also false positives)

@neersighted
neersighted merged commit 3fae370 into python-poetry:master Nov 28, 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-eradicate 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