Fix style to Keyword Args
This commit is contained in:
parent
fcb6f19287
commit
b449ebe3d4
55 changed files with 157 additions and 157 deletions
|
|
@ -57,7 +57,7 @@ class ConnectionWizard(object):
|
|||
"""
|
||||
Ask a yes/no question inline.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
prompt (str): The prompt to ask.
|
||||
default (str): "yes" or "no", used if pressing return.
|
||||
Returns:
|
||||
|
|
@ -83,7 +83,7 @@ class ConnectionWizard(object):
|
|||
"""
|
||||
Ask multiple-choice question, get response inline.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
prompt (str): Input prompt.
|
||||
options (list): List of options. Will be indexable by sequence number 1...
|
||||
default (int): The list index+1 of the default choice, if any
|
||||
|
|
@ -114,7 +114,7 @@ class ConnectionWizard(object):
|
|||
"""
|
||||
Get arbitrary input inline.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
prompt (str): The display prompt.
|
||||
default (str): If empty input, use this.
|
||||
validator (callable): If given, the input will be passed
|
||||
|
|
|
|||
|
|
@ -1639,7 +1639,7 @@ def error_check_python_modules(show_warnings=False):
|
|||
python source files themselves). Best they fail already here
|
||||
before we get any further.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
show_warnings (bool): If non-fatal warning messages should be shown.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ def client_options(session, *args, **kwargs):
|
|||
This allows the client an OOB way to inform us about its name and capabilities.
|
||||
This will be integrated into the session settings
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
get (bool): If this is true, return the settings as a dict
|
||||
(ignore all other kwargs).
|
||||
client (str): A client identifier, like "mushclient".
|
||||
|
|
@ -282,7 +282,7 @@ def login(session, *args, **kwargs):
|
|||
Peform a login. This only works if session is currently not logged
|
||||
in. This will also automatically throttle too quick attempts.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
name (str): Account name
|
||||
password (str): Plain-text password
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ def get_value(session, *args, **kwargs):
|
|||
Return the value of a given attribute or db_property on the
|
||||
session's current account or character.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
name (str): Name of info value to return. Only names
|
||||
in the _gettable dictionary earlier in this module
|
||||
are accepted.
|
||||
|
|
@ -325,7 +325,7 @@ def _testrepeat(**kwargs):
|
|||
This is a test function for using with the repeat
|
||||
inputfunc.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
session (Session): Session to return to.
|
||||
"""
|
||||
import time
|
||||
|
|
@ -342,7 +342,7 @@ def repeat(session, *args, **kwargs):
|
|||
this is meant as an example of limiting the number of
|
||||
possible call functions.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
callback (str): The function to call. Only functions
|
||||
from the _repeatable dictionary earlier in this
|
||||
module are available.
|
||||
|
|
@ -403,7 +403,7 @@ def monitor(session, *args, **kwargs):
|
|||
"""
|
||||
Adds monitoring to a given property or Attribute.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
name (str): The name of the property or Attribute
|
||||
to report. No db_* prefix is needed. Only names
|
||||
in the _monitorable dict earlier in this module
|
||||
|
|
@ -485,7 +485,7 @@ def webclient_options(session, *args, **kwargs):
|
|||
If kwargs is not empty, the key/values stored in there will be persisted
|
||||
to the account object.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
<option name>: an option to save
|
||||
"""
|
||||
account = session.account
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ class GrapevineClient(WebSocketClientProtocol, Session):
|
|||
"""
|
||||
Send data grapevine -> Evennia
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
data (dict): Converted json data.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class IRCBot(irc.IRCClient, Session):
|
|||
"""
|
||||
Data IRC -> Server.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
text (str): Ingoing text.
|
||||
kwargs (any): Other data from protocol.
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ class IRCBot(irc.IRCClient, Session):
|
|||
Args:
|
||||
text (str): Outgoing text.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
user (str): the nick to send
|
||||
privately to.
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ class IRCBotFactory(protocol.ReconnectingClientFactory):
|
|||
Args:
|
||||
sessionhandler (SessionHandler): Reference to the main Sessionhandler.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
uid (int): Bot user id.
|
||||
botname (str): Bot name (seen in IRC channel).
|
||||
channel (str): IRC channel to connect to.
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
Args:
|
||||
session (PortalSession): Session receiving data.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Other data from protocol.
|
||||
|
||||
Notes:
|
||||
|
|
@ -447,7 +447,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
Args:
|
||||
session (Session): Session sending data.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Each key is a command instruction to the
|
||||
protocol on the form key = [[args],{kwargs}]. This will
|
||||
call a method send_<key> on the protocol. If no such
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class RSSReader(Session):
|
|||
"""
|
||||
Data RSS -> Evennia.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
text (str): Incoming text
|
||||
kwargs (any): Options from protocol.
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ class SshProtocol(Manhole, _BASE_SESSION_CLASS):
|
|||
"""
|
||||
Data Evennia -> User
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Options to the protocol.
|
||||
|
||||
"""
|
||||
|
|
@ -277,7 +277,7 @@ class SshProtocol(Manhole, _BASE_SESSION_CLASS):
|
|||
Args:
|
||||
text (str): The first argument is always the text string to send. No other arguments
|
||||
are considered.
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): Send-option flags (booleans)
|
||||
|
||||
- mxp: enforce mxp link support.
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, _BASE_SESSION_CLASS):
|
|||
"""
|
||||
Data User -> Evennia
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Options from the protocol.
|
||||
|
||||
"""
|
||||
|
|
@ -375,7 +375,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, _BASE_SESSION_CLASS):
|
|||
"""
|
||||
Data Evennia -> User
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Options to the protocol
|
||||
"""
|
||||
self.sessionhandler.data_out(self, **kwargs)
|
||||
|
|
@ -389,7 +389,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, _BASE_SESSION_CLASS):
|
|||
Args:
|
||||
text (str): The first argument is always the text string to send. No other arguments
|
||||
are considered.
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): Send-option flags
|
||||
|
||||
- mxp: Enforce MXP link support.
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class WebSocketClient(WebSocketServerProtocol, _BASE_SESSION_CLASS):
|
|||
Args:
|
||||
text (str): Text to send.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): Options-dict with the following keys understood:
|
||||
- raw (bool): No parsing at all (leave ansi-to-html markers unparsed).
|
||||
- nocolor (bool): Clean out all color.
|
||||
|
|
@ -293,7 +293,7 @@ class WebSocketClient(WebSocketServerProtocol, _BASE_SESSION_CLASS):
|
|||
cmdname (str): The first argument will always be the oob cmd name.
|
||||
*args (any): Remaining args will be arguments for `cmd`.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): These are ignored for oob commands. Use command
|
||||
arguments (which can hold dicts) to send instructions to the
|
||||
client instead.
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ class AjaxWebClientSession(session.Session):
|
|||
"""
|
||||
Data User -> Evennia
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Incoming data.
|
||||
|
||||
"""
|
||||
|
|
@ -392,7 +392,7 @@ class AjaxWebClientSession(session.Session):
|
|||
"""
|
||||
Data Evennia -> User
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Options to the protocol
|
||||
"""
|
||||
self.sessionhandler.data_out(self, **kwargs)
|
||||
|
|
@ -405,7 +405,7 @@ class AjaxWebClientSession(session.Session):
|
|||
Args:
|
||||
text (str): Text to send.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): Options-dict with the following keys understood:
|
||||
- raw (bool): No parsing at all (leave ansi-to-html markers unparsed).
|
||||
- nocolor (bool): Remove all color.
|
||||
|
|
@ -457,7 +457,7 @@ class AjaxWebClientSession(session.Session):
|
|||
cmdname (str): The first argument will always be the oob cmd name.
|
||||
*args (any): Remaining args will be arguments for `cmd`.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
options (dict): These are ignored for oob commands. Use command
|
||||
arguments (which can hold dicts) to send instructions to the
|
||||
client instead.
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class ServerSession(Session):
|
|||
"""
|
||||
Update the protocol_flags and sync them with Portal.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
protocol_flag (any): A key and value to set in the
|
||||
protocol_flags dictionary.
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ class ServerSession(Session):
|
|||
"""
|
||||
Sending data from Evennia->Client
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
text (str or tuple)
|
||||
any (str or tuple): Send-commands identified
|
||||
by their keys. Or "options", carrying options
|
||||
|
|
@ -261,7 +261,7 @@ class ServerSession(Session):
|
|||
Receiving data from the client, sending it off to
|
||||
the respective inputfuncs.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Incoming data from protocol on
|
||||
the form `{"commandname": ((args), {kwargs}),...}`
|
||||
Notes:
|
||||
|
|
@ -279,7 +279,7 @@ class ServerSession(Session):
|
|||
Args:
|
||||
text (str): String input.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
any (str or tuple): Send-commands identified
|
||||
by their keys. Or "options", carrying options
|
||||
for the protocol(s).
|
||||
|
|
@ -307,7 +307,7 @@ class ServerSession(Session):
|
|||
session (Session): This is here to make API consistent with
|
||||
Account/Object.execute_cmd. If given, data is passed to
|
||||
that Session, otherwise use self.
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
Other keyword arguments will be added to the found command
|
||||
object instace as variables before it executes. This is
|
||||
unused by default Evennia but may be used to set flags and
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class Session(object):
|
|||
protocols can use this right away. Portal sessions
|
||||
should overload this to format/handle the outgoing data as needed.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Other data to the protocol.
|
||||
|
||||
"""
|
||||
|
|
@ -167,7 +167,7 @@ class Session(object):
|
|||
"""
|
||||
Hook for protocols to send incoming data to the engine.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
kwargs (any): Other data from the protocol.
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -817,7 +817,7 @@ class ServerSessionHandler(SessionHandler):
|
|||
Args:
|
||||
sessions (Session): Session.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
any (tuple): Incoming data from protocol, each
|
||||
on the form `commandname=((args), {kwargs})`.
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class Throttle(object):
|
|||
"""
|
||||
Allows setting of throttle parameters.
|
||||
|
||||
Keyword args:
|
||||
Keyword Args:
|
||||
limit (int): Max number of failures before imposing limiter
|
||||
timeout (int): number of timeout seconds after
|
||||
max number of tries has been reached.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue