Rename docstring Kwargs to Keyword Args
This commit is contained in:
parent
29fc31bb01
commit
7fed14d233
58 changed files with 203 additions and 213 deletions
|
|
@ -175,7 +175,7 @@ def _call_or_get(value, menu=None, choice=None, string=None, obj=None, caller=No
|
|||
Args:
|
||||
value (any): the value to obtain. It might be a callable (see note).
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
menu (BuildingMenu, optional): the building menu to pass to value
|
||||
if it is a callable.
|
||||
choice (Choice, optional): the choice to pass to value if a callable.
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ def get_worn_clothes(character, exclude_covered=False):
|
|||
Args:
|
||||
character (obj): The character to get a list of worn clothes from.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
exclude_covered (bool): If True, excludes clothes covered by other
|
||||
clothing from the returned list.
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ class Clothing(DefaultObject):
|
|||
wearer (obj): character object wearing this clothing object
|
||||
wearstyle (True or str): string describing the style of wear or True for none
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
quiet (bool): If false, does not message the room
|
||||
|
||||
Notes:
|
||||
|
|
@ -276,7 +276,7 @@ class Clothing(DefaultObject):
|
|||
Args:
|
||||
wearer (obj): character object wearing this clothing object
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
quiet (bool): If false, does not message the room
|
||||
"""
|
||||
self.db.worn = False
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def gametime_to_realtime(format=False, **kwargs):
|
|||
in-game, you will be able to find the number of real-world seconds this
|
||||
corresponds to (hint: Interval events deal with real life seconds).
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
format (bool): Formatting the output.
|
||||
days, month etc (int): These are the names of time units that must
|
||||
match the `settings.TIME_UNITS` dict keys.
|
||||
|
|
@ -131,7 +131,7 @@ def realtime_to_gametime(secs=0, mins=0, hrs=0, days=0, weeks=0, months=0, yrs=0
|
|||
interval would correspond to. This is usually a lot less
|
||||
interesting than the other way around.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
times (int): The various components of the time.
|
||||
format (bool): Formatting the output.
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ class BaseState(object):
|
|||
"""
|
||||
This is a convenience-wrapper for quickly building EvscapeRoom objects.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
typeclass (str): This can take just the class-name in the evscaperoom's
|
||||
objects.py module. Otherwise, a full path or the actual class
|
||||
is needed (for custom state objects, just give the class directly).
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def create_evscaperoom_object(
|
|||
Note that for the purpose of the Evscaperoom, we only allow one instance
|
||||
of each *name*, deleting the old version if it already exists.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
typeclass (str): This can take just the class-name in the evscaperoom's
|
||||
objects.py module. Otherwise, a full path is needed.
|
||||
key (str): Name of object.
|
||||
|
|
@ -69,7 +69,7 @@ def create_fantasy_word(length=5, capitalize=True):
|
|||
"""
|
||||
Create a random semi-pronouncable 'word'.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
length (int): The desired length of the 'word'.
|
||||
capitalize (bool): If the return should be capitalized or not
|
||||
Returns:
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class CallbackHandler(object):
|
|||
callback_name (str): the callback name to call.
|
||||
*args: additional variables for this callback.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
number (int, optional): call just a specific callback.
|
||||
parameters (str, optional): call a callback with parameters.
|
||||
locals (dict, optional): a locals replacement.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ def get(**kwargs):
|
|||
"""
|
||||
Return an object with the given search option or None if None is found.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
Any searchable data or property (id, db_key, db_location...).
|
||||
|
||||
Returns:
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ class EventHandler(DefaultScript):
|
|||
callback_name (str): the callback name to call.
|
||||
*args: additional variables for this callback.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
number (int, optional): call just a specific callback.
|
||||
parameters (str, optional): call a callback with parameters.
|
||||
locals (dict, optional): a locals replacement.
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ class EventCharacter(DefaultCharacter):
|
|||
|
||||
Args:
|
||||
message (str): The suggested say/whisper text spoken by self.
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
whisper (bool): If True, this is a whisper rather than
|
||||
a say. This is sent by the whisper command by default.
|
||||
Other verbal commands could use this hook in similar
|
||||
|
|
@ -477,7 +477,7 @@ class EventCharacter(DefaultCharacter):
|
|||
(by default only used by whispers).
|
||||
msg_receiver(str, optional): Specific message for receiver only.
|
||||
mapping (dict, optional): Additional mapping in messages.
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
whisper (bool): If this is a whisper rather than a say. Kwargs
|
||||
can be used by other verbal commands in a similar way.
|
||||
|
||||
|
|
|
|||
|
|
@ -1420,7 +1420,7 @@ class ContribRPObject(DefaultObject):
|
|||
looker (TypedObject): The object or account that is looking
|
||||
at/getting inforamtion for this object.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
pose (bool): Include the pose (if available) in the return.
|
||||
|
||||
Returns:
|
||||
|
|
@ -1508,7 +1508,7 @@ class ContribRPCharacter(DefaultCharacter, ContribRPObject):
|
|||
looker (TypedObject): The object or account that is looking
|
||||
at/getting inforamtion for this object.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
pose (bool): Include the pose (if available) in the return.
|
||||
|
||||
Returns:
|
||||
|
|
@ -1557,7 +1557,7 @@ class ContribRPCharacter(DefaultCharacter, ContribRPObject):
|
|||
|
||||
Args:
|
||||
message (str): The suggested say/whisper text spoken by self.
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
whisper (bool): If True, this is a whisper rather than a say.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class AuditedServerSession(ServerSession):
|
|||
Extracts messages and system data from a Session object upon message
|
||||
send or receive.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
src (str): Source of data; 'client' or 'server'. Indicates direction.
|
||||
text (str or list): Client sends messages to server in the form of
|
||||
lists. Server sends messages to client as string.
|
||||
|
|
@ -216,7 +216,7 @@ class AuditedServerSession(ServerSession):
|
|||
"""
|
||||
Generic hook for sending data out through the protocol.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
kwargs (any): Other data to the protocol.
|
||||
|
||||
"""
|
||||
|
|
@ -234,7 +234,7 @@ class AuditedServerSession(ServerSession):
|
|||
"""
|
||||
Hook for protocols to send incoming data to the engine.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
kwargs (any): Other data from the protocol.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ def spend_action(character, actions, action_name=None):
|
|||
character (obj): Character spending the action
|
||||
actions (int) or 'all': Number of actions to spend, or 'all' to spend all actions
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
action_name (str or None): If a string is given, sets character's last action in
|
||||
combat to provided string
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ def spend_action(character, actions, action_name=None):
|
|||
character (obj): Character spending the action
|
||||
actions (int) or 'all': Number of actions to spend, or 'all' to spend all actions
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
action_name (str or None): If a string is given, sets character's last action in
|
||||
combat to provided string
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ def spend_action(character, actions, action_name=None):
|
|||
character (obj): Character spending the action
|
||||
actions (int) or 'all': Number of actions to spend, or 'all' to spend all actions
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
action_name (str or None): If a string is given, sets character's last action in
|
||||
combat to provided string
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ def spend_action(character, actions, action_name=None):
|
|||
character (obj): Character spending the action
|
||||
actions (int) or 'all': Number of actions to spend, or 'all' to spend all actions
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
action_name (str or None): If a string is given, sets character's last action in
|
||||
combat to provided string
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ def spend_action(character, actions, action_name=None):
|
|||
character (obj): Character spending the action
|
||||
actions (int) or 'all': Number of actions to spend, or 'all' to spend all actions
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
action_name (str or None): If a string is given, sets character's last action in
|
||||
combat to provided string
|
||||
"""
|
||||
|
|
@ -642,7 +642,7 @@ class TBRangeTurnHandler(DefaultScript):
|
|||
Args:
|
||||
to_init (object): Object to initialize range field for.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
anchor_obj (object): Object to copy range values from, or None for a random object.
|
||||
add_distance (int): Distance to put between to_init object and anchor object.
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class UnixCommandParser(argparse.ArgumentParser):
|
|||
epilog (str): the epilog to show below options.
|
||||
command (Command): the command calling the parser.
|
||||
|
||||
Kwargs:
|
||||
Keyword args:
|
||||
Additional keyword arguments are directly sent to
|
||||
`argparse.ArgumentParser`. You will find them on the
|
||||
[parser's documentation](https://docs.python.org/2/library/argparse.html).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue