GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — gh-104146: Purge dead code from Argument Clinic by erlend-aasland · Pull Request #104680 · python/cpython Conversation
|
| def directive_module(self, name): | ||
| fields = name.split('.') | ||
| new = fields.pop() | ||
| fields = name.split('.')[1:] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
pop() removes the last item in the list, no?
| fields = name.split('.')[1:] | |
| fields = name.split('.')[:-1] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Yes, [1:] is definitely wrong. Strangely, make clinic does not complain or generate incorrect.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Would you be interested in possibly running pyflakes on Tools/clinic/ in CI, to catch this kind of thing in the future? It's a linter that tries extremely hard to have 0 false positives, and didn't have any hits on Tools/clinic/ other than the ones that are being fixed here |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think that's a good idea. Others might disagree :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I can open an issue and we can see if anybody objects! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Remove dead code from clinic.py
There was an error while loading. Please reload this page.