Fix style to Keyword Args

This commit is contained in:
Griatch 2020-10-12 21:13:06 +02:00
parent fcb6f19287
commit b449ebe3d4
55 changed files with 157 additions and 157 deletions

View file

@ -70,7 +70,7 @@ def create_object(
Create a new in-game object.
Keyword args:
Keyword Args:
typeclass (class or str): Class or python path to a typeclass.
key (str): Name of the new object. If not set, a name of
`#dbref` will be set.
@ -197,7 +197,7 @@ def create_script(
scripts. It's behaviour is similar to the game objects except
scripts has a time component and are more limited in scope.
Keyword args:
Keyword Args:
typeclass (class or str): Class or python path to a typeclass.
key (str): Name of the new object. If not set, a name of
#dbref will be set.
@ -430,7 +430,7 @@ def create_channel(
Args:
key (str): This must be unique.
Keyword args:
Keyword Args:
aliases (list of str): List of alternative (likely shorter) keynames.
desc (str): A description of the channel, for use in listings.
locks (str): Lockstring.
@ -496,7 +496,7 @@ def create_account(
the empty string, will be set to None.
password (str): Password in cleartext.
Keyword args:
Keyword Args:
typeclass (str): The typeclass to use for the account.
is_superuser (bool): Wether or not this account is to be a superuser
locks (str): Lockstring.

View file

@ -190,7 +190,7 @@ class EvForm(object):
"""
Initiate the form
Keyword args:
Keyword Args:
filename (str): Path to template file.
cells (dict): A dictionary mapping `{id: text}`
tables (dict): A dictionary mapping `{id: EvTable}`.

View file

@ -285,7 +285,7 @@ def wrap(text, width=_DEFAULT_WIDTH, **kwargs):
text (str): Text to wrap.
width (int, optional): Width to wrap `text` to.
Keyword args:
Keyword Args:
See TextWrapper class for available keyword args to customize
wrapping behaviour.
@ -306,7 +306,7 @@ def fill(text, width=_DEFAULT_WIDTH, **kwargs):
text (str): Text to fill.
width (int, optional): Width of fill area.
Keyword args:
Keyword Args:
See TextWrapper class for available keyword args to customize
filling behaviour.
@ -331,7 +331,7 @@ class EvCell(object):
Args:
data (str): The un-padded data of the entry.
Keyword args:
Keyword Args:
width (int): Desired width of cell. It will pad
to this size.
height (int): Desired height of cell. it will pad
@ -776,7 +776,7 @@ class EvCell(object):
"""
Reformat the EvCell with new options
Keyword args:
Keyword Args:
The available keyword arguments are the same as for `EvCell.__init__`.
Raises:
@ -935,7 +935,7 @@ class EvColumn(object):
Args:
Text for each row in the column
Keyword args:
Keyword Args:
All `EvCell.__init_` keywords are available, these
settings will be persistently applied to every Cell in the
column.
@ -950,7 +950,7 @@ class EvColumn(object):
coherent and lined-up column. Will enforce column-specific
options to cells.
Keyword args:
Keyword Args:
Extra keywords to modify the column setting. Same keywords
as in `EvCell.__init__`.
@ -982,7 +982,7 @@ class EvColumn(object):
use `ypos=0`. If not given, data will be inserted at the end
of the column.
Keyword args:
Keyword Args:
Available keywods as per `EvCell.__init__`.
"""
@ -1001,7 +1001,7 @@ class EvColumn(object):
"""
Change the options for the column.
Keyword args:
Keyword Args:
Keywords as per `EvCell.__init__`.
"""
@ -1016,7 +1016,7 @@ class EvColumn(object):
index (int): Index location of the cell in the column,
starting from 0 for the first row to Nrows-1.
Keyword args:
Keyword Args:
Keywords as per `EvCell.__init__`.
"""
@ -1056,7 +1056,7 @@ class EvTable(object):
Args:
Header texts for the table.
Keyword args:
Keyword Args:
table (list of lists or list of `EvColumns`, optional):
This is used to build the table in a quick way. If not
given, the table will start out empty and `add_` methods
@ -1210,7 +1210,7 @@ class EvTable(object):
nx (int): x size of table.
ny (int): y size of table.
Keyword args:
Keyword Args:
Keywords as per `EvTable.__init__`.
Returns:
@ -1537,7 +1537,7 @@ class EvTable(object):
Args:
args (str): These strings will be used as the header texts.
Keyword args:
Keyword Args:
Same keywords as per `EvTable.__init__`. Will be applied
to the new header's cells.
@ -1561,7 +1561,7 @@ class EvTable(object):
to input new column. If not given, column will be added to the end
of the table. Uses Python indexing (so first column is `xpos=0`)
Keyword args:
Keyword Args:
Other keywords as per `Cell.__init__`.
"""
@ -1625,7 +1625,7 @@ class EvTable(object):
input new row. If not given, will be added to the end of the table.
Uses Python indexing (so first row is `ypos=0`)
Keyword args:
Keyword Args:
Other keywords are as per `EvCell.__init__`.
"""
@ -1664,7 +1664,7 @@ class EvTable(object):
"""
Force a re-shape of the entire table.
Keyword args:
Keyword Args:
Table options as per `EvTable.__init__`.
"""
@ -1700,7 +1700,7 @@ class EvTable(object):
index (int): Which column to reformat. The column index is
given from 0 to Ncolumns-1.
Keyword args:
Keyword Args:
Column options as per `EvCell.__init__`.
Raises:

View file

@ -137,7 +137,7 @@ def pad(*args, **kwargs):
fillchar (str, optional): Character used for padding. Defaults to a
space.
Keyword args:
Keyword Args:
session (Session): Session performing the pad.
Example:
@ -167,7 +167,7 @@ def crop(*args, **kwargs):
crop in characters.
suffix (str, optional): End string to mark the fact that a part
of the string was cropped. Defaults to `[...]`.
Keyword args:
Keyword Args:
session (Session): Session performing the crop.
Example:
@ -192,7 +192,7 @@ def space(*args, **kwargs):
Args:
spaces (int, optional): The number of spaces to insert.
Keyword args:
Keyword Args:
session (Session): Session performing the crop.
Example:
@ -215,7 +215,7 @@ def clr(*args, **kwargs):
text (str, optional): Text
endclr (str, optional): The color to use at the end of the string. Defaults
to `|n` (reset-color).
Keyword args:
Keyword Args:
session (Session): Session object triggering inlinefunc.
Example:
@ -372,7 +372,7 @@ def parse_inlinefunc(string, strip=False, available_funcs=None, stacktrace=False
available_funcs (dict, optional): Define an alternative source of functions to parse for.
If unset, use the functions found through `settings.INLINEFUNC_MODULES`.
stacktrace (bool, optional): If set, print the stacktrace to log.
Keyword args:
Keyword Args:
session (Session): This is sent to this function by Evennia when triggering
it. It is passed to the inlinefunc.
kwargs (any): All other kwargs are also passed on to the inlinefunc.

View file

@ -113,7 +113,7 @@ class BaseOption(object):
where `kwargs` are a combination of those passed into this function and
the ones specified by the `OptionHandler`.
Keyword args:
Keyword Args:
any (any): Not used by default. These are passed in from self.set
and allows the option to let the caller customize saving by
overriding or extend the default save kwargs
@ -173,7 +173,7 @@ class BaseOption(object):
"""
Renders the Option's value as something pretty to look at.
Keyword args:
Keyword Args:
any (any): These are options passed by the caller to potentially
customize display dynamically.

View file

@ -1027,7 +1027,7 @@ def delay(timedelay, callback, *args, **kwargs):
callback (callable): Will be called as `callback(*args, **kwargs)`
after `timedelay` seconds.
*args: Will be used as arguments to callback
Keyword args:
Keyword Args:
persistent (bool): Make the delay persistent over a reboot or reload.
any: Any other keywords will be use as keyword arguments to callback.
@ -1069,7 +1069,7 @@ def run_async(to_execute, *args, **kwargs):
executed with `*args` and non-reserved `**kwargs` as arguments.
The callable will be executed using ProcPool, or in a thread
if ProcPool is not available.
Keyword args:
Keyword Args:
at_return (callable): Should point to a callable with one
argument. It will be called with the return value from
to_execute.
@ -2070,7 +2070,7 @@ def at_search_result(matches, caller, query="", quiet=False, **kwargs):
query (str, optional): The search query used to produce `matches`.
quiet (bool, optional): If `True`, no messages will be echoed to caller
on errors.
Keyword args:
Keyword Args:
nofound_string (str): Replacement string to echo on a notfound error.
multimatch_string (str): Replacement string to echo on a multimatch error.
@ -2135,7 +2135,7 @@ class LimitedSizeOrderedDict(OrderedDict):
"""
Limited-size ordered dict.
Keyword args:
Keyword Args:
size_limit (int): Use this to limit the number of elements
alloweds to be in this list. By default the overshooting elements
will be removed in FIFO order.