Opened 7 years ago

Last modified 7 years ago

#28412 closed Uncategorized

BaseCommand "help" masks Python builtin — at Version 1

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 (1)

comment:1 by Carl Dunham, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top