Skip to content

Commit

Permalink
Unexpected unindent Sphinx-build warning fix
Browse files Browse the repository at this point in the history
Reference: avocado-framework#5757
Signed-off-by: Jan Richter <[email protected]>
  • Loading branch information
richtja committed Nov 28, 2023
1 parent abbe12a commit 4a4cfd2
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion avocado/core/plugin_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def post_test_runnables(self, test_runnable, suite_config=None):
:param suite_config: Configuration dict relevant for the whole suite.
:return: PostTest task runnables created by plugin.
:rtype: list of tuple(:class:`avocado.core.nrunner.Runnable`,
`avocado.core.task.runtime.RuntimeTask.possible_dependency_results`)
`avocado.core.task.runtime.RuntimeTask.possible_dependency_results`)
"""


Expand Down
6 changes: 4 additions & 2 deletions avocado/core/task/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def from_runnable(
make into the job's results.
:type job_id: str
:param satisfiable_deps_execution_statuses: The dependency result types that
satisfy the execution of this RuntimeTask.
satisfy the execution of this
RuntimeTask.
:type satisfiable_deps_execution_statuses: list of test results.
:returns: RuntimeTask of the test from runnable
"""
Expand Down Expand Up @@ -111,7 +112,8 @@ def __init__(self, task, satisfiable_deps_execution_statuses=None):
:param task: The task to keep additional information about
:type task: :class:`avocado.core.nrunner.Task`
:param satisfiable_deps_execution_statuses: The dependency result types that
satisfy the execution of this RuntimeTask.
satisfy the execution of this
RuntimeTask.
:type satisfiable_deps_execution_statuses: list of test results.
"""
#: The :class:`avocado.core.nrunner.Task`
Expand Down
4 changes: 2 additions & 2 deletions avocado/core/utils/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def get(
"""Creates finished message with all necessary information.
:param result: test result
:type result values for the statuses defined in
:class: avocado.core.teststatus.STATUSES
:type result: values for the statuses defined in
:class: avocado.core.teststatus.STATUSES
:param fail_reason: parameter for brief specification, of the failed
result.
:type fail_reason: str
Expand Down
6 changes: 4 additions & 2 deletions avocado/utils/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,10 @@ def get_numa_node_has_cpus():
Get the list NUMA node numbers which has CPU's on the system,
if there is no CPU associated to NUMA node,Those NUMA node number
will not be appended to list.
:return: A list where NUMA node numbers only which has
CPU's - as elements of The list.
:rtype : List
:rtype: List
"""
cpu_path = "/sys/devices/system/node/has_cpu"
delim = ",", "-"
Expand All @@ -515,9 +516,10 @@ def get_numa_node_has_cpus():
def numa_nodes_with_assigned_cpus():
"""
Get NUMA nodes with associated CPU's on the system.
:return: A dictionary,in which "NUMA node numbers" as key
and "NUMA node associated CPU's" as values.
:rtype : dictionary
:rtype: dictionary
"""
numa_nodes_with_cpus = {}
for path in glob.glob("/sys/devices/system/node/node[0-9]*"):
Expand Down
6 changes: 3 additions & 3 deletions avocado/utils/network/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def netmask_to_cidr(self, netmask):
255.255.252.0 = 22
:param netmask: Netmask value example 255.255.255.0
:return : Returns mask value of given netmask
:return: Returns mask value of given netmask
"""
return sum(bin(int(bits)).count("1") for bits in netmask.split("."))

Expand Down Expand Up @@ -796,9 +796,9 @@ def ping_flood(self, int_name, peer_ip, ping_count):
:param int_name: source interface name.
:param peer_ip: Peer IP address (IPv4 or IPv6)
:param ping_count: How many ICMP echo packets to send.
:return : returns True on successful ping flood.
:return: returns True on successful ping flood.
returns False on ping flood failure.
:rtype : boolean
:rtype: boolean
"""
cmd = f"ping -I {int_name} {peer_ip} -c {ping_count} -f "
ping_process = subprocess.Popen(
Expand Down
30 changes: 15 additions & 15 deletions avocado/utils/pci.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def unbind(driver, full_pci_address):
:param driver: driver of the PCI address (full_pci_address)
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: None
:return: None
"""
genio.write_file_or_fail(f"/sys/bus/pci/drivers/{driver}/unbind", full_pci_address)
if wait.wait_for(
Expand All @@ -345,7 +345,7 @@ def bind(driver, full_pci_address):
:param driver: driver of the PCI address (full_pci_address)
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: None
:return: None
"""
genio.write_file_or_fail(f"/sys/bus/pci/drivers/{driver}/bind", full_pci_address)
if not wait.wait_for(
Expand All @@ -363,8 +363,8 @@ def get_vendor_id(full_pci_address):
Get vendor id of a PCI address
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: vendor id of PCI address
rtype: str
:return: vendor id of PCI address
:rtype: str
"""
cmd = f"lspci -n -s {full_pci_address}"
out = process.run(cmd, ignore_status=True, shell=True).stdout_text
Expand All @@ -378,8 +378,8 @@ def reset_check(full_pci_address):
Check if reset for "full_pci_address" is successful
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: whether reset for "full_pci_address" is successful
rtype: bool
:return: whether reset for "full_pci_address" is successful
:rtype: bool
"""
cmd = f"lspci -vvs {full_pci_address}"
output = process.run(cmd, ignore_status=True, shell=True).stdout_text
Expand All @@ -393,8 +393,8 @@ def rescan_check(full_pci_address):
Check if rescan for full_pci_address is successful
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: whether rescan for full_pci_address is successful
rtype: bool
:return: whether rescan for full_pci_address is successful
:rtype: bool
"""
cmd = f"lspci -vvs {full_pci_address}"
output = process.run(cmd, ignore_status=True, shell=True).stdout_text
Expand All @@ -410,8 +410,8 @@ def change_domain_check(dom, full_pci_address, def_dom):
:param dom: domain type
:param def_dom: default domain of pci device(full_pci_address)
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: whether domain changed successfully to "dom"
rtype: bool
:return: whether domain changed successfully to "dom"
:rtype: bool
"""
try:
output = genio.read_one_line(
Expand All @@ -430,7 +430,7 @@ def reset(full_pci_address):
Remove the full_pci_address
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: None
:return: None
"""
genio.write_file_or_fail(f"/sys/bus/pci/devices/{full_pci_address}/remove", "1")
if not wait.wait_for(lambda: reset_check(full_pci_address), timeout=5):
Expand All @@ -442,7 +442,7 @@ def rescan(full_pci_address):
Rescan the system and check for full_pci_address
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: None
:return: None
"""
genio.write_file_or_fail("/sys/bus/pci/rescan", "1")
if not wait.wait_for(lambda: rescan_check(full_pci_address), timeout=5):
Expand All @@ -454,8 +454,8 @@ def get_iommu_group(full_pci_address):
Return the iommu group of full_pci_address
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: iommu group of full_pci_address
rtype: string
:return: iommu group of full_pci_address
:rtype: string
"""
cmd = f"lspci -vvvv -s {full_pci_address}"
out = process.run(cmd, ignore_status=True, shell=True)
Expand All @@ -472,7 +472,7 @@ def change_domain(dom, def_dom, full_pci_address):
:param dom: domain type
:param def_dom: default domain of pci device(full_pci_address)
:param full_pci_address: Full PCI address including domain (0000:03:00.0)
return: None
:return: None
"""
genio.write_file_or_fail(
f"/sys/bus/pci/devices/{full_pci_address}/iommu_group/type", dom
Expand Down
2 changes: 1 addition & 1 deletion avocado/utils/software_manager/backends/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def prepare_source(spec_file, dest_path=None, build_option=None):
Rpmbuild the spec path and return build dir
:param spec_path: spec path to install
:param build_option : rpmbuild option
:param build_option: rpmbuild option
:return path: build directory
"""

Expand Down
2 changes: 1 addition & 1 deletion avocado/utils/software_manager/backends/yum.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_source(self, name, dest_path, build_option=None):
:param name: name of the package
:param dest_path: destination_path
:param build_option : rpmbuild option
:param build_option: rpmbuild option
:return final_dir: path of ready-to-build directory
"""
Expand Down
2 changes: 1 addition & 1 deletion avocado/utils/software_manager/backends/zypper.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def get_source(self, name, dest_path, build_option=None):
:param name: name of the package
:param dest_path: destination_path
:param build_option : rpmbuild option
:param build_option: rpmbuild option
:return final_dir: path of ready-to-build directory
"""
Expand Down
6 changes: 3 additions & 3 deletions docs/source/blueprints/BP005.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ potential need for a new release:
* If the number of commits since last release has reached a threshold; AND
* There is no open discussion with the tag “release-decision”:
* Creates a new discussion (with the "release-decision" tag) to run a poll
between all the MAINTAINERS, so they will have the opportunity to thumbs
up if there is a need for a new release;
between all the MAINTAINERS, so they will have the opportunity to thumbs
up if there is a need for a new release;
* The link to the new discussion should be sent to all MAINTAINERS;
* If the decision is positive, a round-robin selected maintainer should be
responsible for coordinating the release it self;
responsible for coordinating the release it self;
* And the discussion should be closed
* If there is any existing open discussion, the bot job should comment on the
same discussion with the updated list of commits and ping again the
Expand Down
6 changes: 3 additions & 3 deletions docs/source/releases/lts/92_0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ Bug Fixes
meaningful exit code on some failures and success situations.

* The extraction of DEB packages by means of
:meth:`avocado.utils.software_manager.SoftwareManager.extract_from_package`
was fixed and does not depend on the ``ar`` utility anymore (as it now
uses the :mod:`avocado.utils.ar` module).
:meth:`avocado.utils.software_manager.SoftwareManager.extract_from_package`
was fixed and does not depend on the ``ar`` utility anymore (as it now
uses the :mod:`avocado.utils.ar` module).

* The ``--store-logging-stream`` parameter value was being incorrectly
parsed as a list of characters. If a ``bar`` value is given, it
Expand Down

0 comments on commit 4a4cfd2

Please sign in to comment.