#28412 closed Uncategorized (wontfix)
BaseCommand "help" masks Python builtin
Reported by: | Carl Dunham | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When creating a command using BaseCommand, the help text is included in a class attribute called 'help'. This masks the Python global 'help' function.
While not likely to arise in normal use ('help' is considered an interactive command), this isn't a good code smell.
class Command(BaseCommand): help = 'Useful Advice'
https://pypi.python.org/pypi/flake8-builtins could be considered helpful here.
Change History (2)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Version 0, edited 7 years ago by (next)
Note:
See TracTickets
for help on using tickets.
Thank you for your report but given the
help
builtin is only shadowed during theCommand
class definition where it's highly unlikely to be used and the backward compatibility concerns related to changing the attribute name I'm going to close this ticket as _wontfix_.