[commands] Do not lower-case the function name for default command names
There are some badlets out there that apparently violate PEP-8.
This commit is contained in:
parent
a2b053a517
commit
4d71b3fe7d
@ -616,7 +616,7 @@ def command(name=None, cls=None, **attrs):
|
|||||||
-----------
|
-----------
|
||||||
name : str
|
name : str
|
||||||
The name to create the command with. By default this uses the
|
The name to create the command with. By default this uses the
|
||||||
function named unchanged.
|
function name unchanged.
|
||||||
cls
|
cls
|
||||||
The class to construct with. By default this is :class:`Command`.
|
The class to construct with. By default this is :class:`Command`.
|
||||||
You usually do not change this.
|
You usually do not change this.
|
||||||
@ -654,7 +654,7 @@ def command(name=None, cls=None, **attrs):
|
|||||||
help_doc = help_doc.decode('utf-8')
|
help_doc = help_doc.decode('utf-8')
|
||||||
|
|
||||||
attrs['help'] = help_doc
|
attrs['help'] = help_doc
|
||||||
fname = name or func.__name__.lower()
|
fname = name or func.__name__
|
||||||
return cls(name=fname, callback=func, checks=checks, **attrs)
|
return cls(name=fname, callback=func, checks=checks, **attrs)
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user