removed rtype and param typing from doc strings to help avoid maintaining duplicate information provided by type hints

This commit is contained in:
Blake Harnden 2020-01-16 11:00:57 -08:00
parent 9d89877b20
commit f4ddf310a8
32 changed files with 1091 additions and 1357 deletions

View file

@ -82,15 +82,15 @@ class LxcNode(CoreNode):
"""
Create a LxcNode instance.
:param core.emulator.session.Session session: core session instance
:param int _id: object id
:param str name: object name
:param str nodedir: node directory
:param str bootsh: boot shell to use
:param bool start: start flag
:param core.emulator.distributed.DistributedServer server: remote server node
:param session: core session instance
:param _id: object id
:param name: object name
:param nodedir: node directory
:param bootsh: boot shell to use
:param start: start flag
:param server: remote server node
will run on, default is None for localhost
:param str image: image to start container with
:param image: image to start container with
"""
if image is None:
image = "ubuntu"
@ -102,8 +102,7 @@ class LxcNode(CoreNode):
Check if the node is alive.
:return: True if node is alive, False otherwise
:rtype: bool
"""
"""
return self.client.is_alive()
def startup(self) -> None:
@ -139,7 +138,7 @@ class LxcNode(CoreNode):
"""
Create a terminal command string.
:param str sh: shell to execute command in
:param sh: shell to execute command in
:return: str
"""
return f"lxc exec {self.name} -- {sh}"
@ -148,7 +147,7 @@ class LxcNode(CoreNode):
"""
Create a private directory.
:param str path: path to create
:param path: path to create
:return: nothing
"""
logging.info("creating node dir: %s", path)
@ -159,8 +158,8 @@ class LxcNode(CoreNode):
"""
Create and mount a directory.
:param str source: source directory to mount
:param str target: target directory to create
:param source: source directory to mount
:param target: target directory to create
:return: nothing
:raises CoreCommandError: when a non-zero exit status occurs
"""
@ -171,9 +170,9 @@ class LxcNode(CoreNode):
"""
Create a node file with a given mode.
:param str filename: name of file to create
:param filename: name of file to create
:param contents: contents of file
:param int mode: mode for file
:param mode: mode for file
:return: nothing
"""
logging.debug("nodefile filename(%s) mode(%s)", filename, mode)
@ -199,9 +198,9 @@ class LxcNode(CoreNode):
Copy a file to a node, following symlinks and preserving metadata.
Change file mode if specified.
:param str filename: file name to copy file to
:param str srcfilename: file to copy
:param int mode: mode to copy to
:param filename: file name to copy file to
:param srcfilename: file to copy
:param mode: mode to copy to
:return: nothing
"""
logging.info(