Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Carl Dunham)

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 Carl Dunham, 7 years ago

Description: modified (diff)

comment:2 by Simon Charette, 7 years ago

Resolution: wontfix
Status: newclosed

Thank you for your report but given the help builtin is only shadowed during the Command 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_.

Version 0, edited 7 years ago by Simon Charette (next)
Note: See TracTickets for help on using tickets.
Back to Top