From 4a4cfd2516115fe9f8af734b831d1a36c06e317b Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Mon, 13 Nov 2023 13:42:39 +0100 Subject: [PATCH] Unexpected unindent Sphinx-build warning fix Reference: #5757 Signed-off-by: Jan Richter --- avocado/core/plugin_interfaces.py | 2 +- avocado/core/task/runtime.py | 6 ++-- avocado/core/utils/messages.py | 4 +-- avocado/utils/cpu.py | 6 ++-- avocado/utils/network/interfaces.py | 6 ++-- avocado/utils/pci.py | 30 +++++++++---------- .../utils/software_manager/backends/rpm.py | 2 +- .../utils/software_manager/backends/yum.py | 2 +- .../utils/software_manager/backends/zypper.py | 2 +- docs/source/blueprints/BP005.rst | 6 ++-- docs/source/releases/lts/92_0.rst | 6 ++-- 11 files changed, 38 insertions(+), 34 deletions(-) diff --git a/avocado/core/plugin_interfaces.py b/avocado/core/plugin_interfaces.py index 51953bef77..01424149c2 100644 --- a/avocado/core/plugin_interfaces.py +++ b/avocado/core/plugin_interfaces.py @@ -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`) """ diff --git a/avocado/core/task/runtime.py b/avocado/core/task/runtime.py index 1547d08b50..07d3648887 100644 --- a/avocado/core/task/runtime.py +++ b/avocado/core/task/runtime.py @@ -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 """ @@ -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` diff --git a/avocado/core/utils/messages.py b/avocado/core/utils/messages.py index 093e19a8f0..a705090942 100644 --- a/avocado/core/utils/messages.py +++ b/avocado/core/utils/messages.py @@ -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 diff --git a/avocado/utils/cpu.py b/avocado/utils/cpu.py index b2a300ab04..eff1b4e7c6 100644 --- a/avocado/utils/cpu.py +++ b/avocado/utils/cpu.py @@ -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 = ",", "-" @@ -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]*"): diff --git a/avocado/utils/network/interfaces.py b/avocado/utils/network/interfaces.py index 85aa9b0b46..3426d7ef42 100644 --- a/avocado/utils/network/interfaces.py +++ b/avocado/utils/network/interfaces.py @@ -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(".")) @@ -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( diff --git a/avocado/utils/pci.py b/avocado/utils/pci.py index a4d8e690dc..0e32817b80 100644 --- a/avocado/utils/pci.py +++ b/avocado/utils/pci.py @@ -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( @@ -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( @@ -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 @@ -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 @@ -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 @@ -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( @@ -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): @@ -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): @@ -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) @@ -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 diff --git a/avocado/utils/software_manager/backends/rpm.py b/avocado/utils/software_manager/backends/rpm.py index 89a6152d79..e9a2504a3b 100644 --- a/avocado/utils/software_manager/backends/rpm.py +++ b/avocado/utils/software_manager/backends/rpm.py @@ -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 """ diff --git a/avocado/utils/software_manager/backends/yum.py b/avocado/utils/software_manager/backends/yum.py index b9fb028b3e..4f8d1f4589 100644 --- a/avocado/utils/software_manager/backends/yum.py +++ b/avocado/utils/software_manager/backends/yum.py @@ -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 """ diff --git a/avocado/utils/software_manager/backends/zypper.py b/avocado/utils/software_manager/backends/zypper.py index d9d061358d..e4b737faa0 100644 --- a/avocado/utils/software_manager/backends/zypper.py +++ b/avocado/utils/software_manager/backends/zypper.py @@ -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 """ diff --git a/docs/source/blueprints/BP005.rst b/docs/source/blueprints/BP005.rst index 187c77b69b..dfc132e8db 100644 --- a/docs/source/blueprints/BP005.rst +++ b/docs/source/blueprints/BP005.rst @@ -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 diff --git a/docs/source/releases/lts/92_0.rst b/docs/source/releases/lts/92_0.rst index 8109a85fa5..ef09faab5a 100644 --- a/docs/source/releases/lts/92_0.rst +++ b/docs/source/releases/lts/92_0.rst @@ -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