Opened 6 years ago

Closed 6 years ago

Last modified 6 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' could be considered helpful here.

Change History (2)

comment:1 Changed 6 years ago by Carl Dunham

Description: modified (diff)

comment:2 Changed 6 years ago by Simon Charette

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.

Last edited 6 years ago by Simon Charette (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top