Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/grass/gunittest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
durations: int | None = None,
**kwargs,
) -> None:
"""Construct a TextTestResult. Subclasses should accept **kwargs
"""Construct a TextTestResult. Subclasses should accept ``**kwargs``
to ensure compatibility as the interface changes."""
super().__init__(
stream=stream, descriptions=descriptions, verbosity=verbosity, **kwargs
Expand Down
2 changes: 1 addition & 1 deletion python/grass/imaging/images2avi.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def writeAvi(
:param inputOptions:
:param outputOptions:
:param bool bg_task: if thread background task, not raise but
return error message
return error message

:return str: error message
"""
Expand Down
5 changes: 3 additions & 2 deletions python/grass/pydispatch/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
providing the primary API and the core logic for the
system.

Module attributes of note:
Module attributes of note::

Any -- Singleton used to signal either "Any Sender" or
"Any Signal". See documentation of the _Any class.
Anonymous -- Singleton used to signal "Anonymous Sender"
See documentation of the _Anonymous class.

Internal attributes:
Internal attributes::

WEAKREF_TYPES -- tuple of types/classes which represent
weak references to receivers, and thus must be de-
referenced on retrieval to retrieve the callable
Expand Down
2 changes: 1 addition & 1 deletion python/grass/pygrass/raster/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

class Info:
def __init__(self, name, mapset=""):
"""Read the information for a raster map. ::
"""Read the information for a raster map.

>>> info = Info(test_raster_name)
>>> info.read()
Expand Down
8 changes: 4 additions & 4 deletions python/grass/pygrass/vector/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,11 +1269,11 @@ class Node:
"""

def __init__(self, v_id, c_mapinfo, **kwords):
"""Construct a Node object
r"""Construct a Node object

param v_id: The unique node id
param c_mapinfo: A valid pointer to the mapinfo object
param **kwords: Ignored
:param v_id: The unique node id
:param c_mapinfo: A valid pointer to the mapinfo object
:param \*\*kwords: Ignored
"""
self.id = v_id # vector id
self.c_mapinfo = c_mapinfo
Expand Down
2 changes: 1 addition & 1 deletion python/grass/temporal/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def init(
structure for raster, vector and raster3d maps as well as for the space-time
dataset types strds, str3ds and stvds.

.. warning::
.. warning::

This functions must be called before any spatio-temporal processing
can be started
Expand Down
16 changes: 8 additions & 8 deletions python/grass/tools/session_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,14 @@ def run_cmd(
tool_kwargs: dict | None = None,
**popen_options,
):
"""Run a tool by passing its name and parameters a list of strings.
r"""Run a tool by passing its name and parameters a list of strings.

The function will perform additional processing on the parameters
such as importing GRASS native raster files to in-project data.

:param command: list of strings to execute as the command
:param input: text input for the standard input of the tool
:param **popen_options: additional options for :py:func:`subprocess.Popen`
:param \*\*popen_options: additional options for :py:func:`subprocess.Popen`
"""
return self._run_cmd(command, input=input, **popen_options)

Expand All @@ -466,7 +466,7 @@ def _run_cmd(
tool_kwargs: dict | None = None,
**popen_options,
):
"""Run a tool by passing its name and parameters a list of strings.
r"""Run a tool by passing its name and parameters a list of strings.

If parameters were already processed using a *ParameterConverter* instance,
the instance can be passed as the *parameter_converter* parameter, avoiding
Expand All @@ -476,7 +476,7 @@ def _run_cmd(
:param input: text input for the standard input of the tool
:param parameter_converter: a Parameter converter instance if already used
:param tool_kwargs: named tool arguments used for error reporting (experimental)
:param **popen_options: additional options for :py:func:`subprocess.Popen`
:param \*\*popen_options: additional options for :py:func:`subprocess.Popen`
"""
# Compute the environment for subprocesses and store it for later use.
if "env" not in popen_options:
Expand Down Expand Up @@ -525,7 +525,7 @@ def _run_cmd(
return result

def call(self, tool_name_: str, /, **kwargs):
"""Run a tool by specifying its name as a string and parameters.
r"""Run a tool by specifying its name as a string and parameters.

The parameters tool are tool name as a string and parameters as keyword
arguments. The keyword arguments may include an argument *flags* which is a
Expand All @@ -536,21 +536,21 @@ def call(self, tool_name_: str, /, **kwargs):
strings for execution.

:param tool_name_: name of a GRASS tool
:param **kwargs: tool parameters
:param \*\*kwargs: tool parameters
"""
args, popen_options = gs.popen_args_command(tool_name_, **kwargs)
return self.call_cmd(args, **popen_options)

def call_cmd(self, command, tool_kwargs=None, input=None, **popen_options):
"""Run a tool by passing its name and parameters as a list of strings.
r"""Run a tool by passing its name and parameters as a list of strings.

The function is similar to :py:func:`subprocess.run` but with different
defaults and return value.

:param command: list of strings to execute as the command
:param tool_kwargs: named tool arguments used for error reporting
:param input: text input for the standard input of the tool
:param **popen_options: additional options for :py:func:`subprocess.Popen`
:param \*\*popen_options: additional options for :py:func:`subprocess.Popen`
"""
# We allow the user to overwrite env, which allows for maximum flexibility
# with some potential for confusion when the user uses a broken environment.
Expand Down
Loading