Skip to content

Commit

Permalink
Bump black from 22.3.0 to 24.3.0
Browse files Browse the repository at this point in the history
It will bump black version to be align with avocado

Signed-off-by: Jan Richter <jarichte@redhat.com>
  • Loading branch information
richtja committed Jan 27, 2025
1 parent b806c47 commit a6f1608
Show file tree
Hide file tree
Showing 181 changed files with 110 additions and 638 deletions.
2 changes: 0 additions & 2 deletions avocado_vt/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def arch_listing(config, guest_name_parser=None):


class NotAvocadoVTTest(object):

"""
Not an Avocado-vt test (for reporting purposes)
"""
Expand All @@ -93,7 +92,6 @@ class NotAvocadoVTTest(object):
if AVOCADO_LOADER_AVAILABLE:

class VirtTestLoader(loader.TestLoader, DiscoveryMixIn):

"""
Avocado loader plugin to load avocado-vt tests
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@


class VirtTestOptionsProcess(object):

"""
Pick virt test options and parse them to get to a cartesian parser.
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/plugins/vt.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def _str_or_none(arg):


class VTRun(CLI):

"""
Avocado VT - legacy virt-test support
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/plugins/vt_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class VTBootstrap(CLICmd):

"""
Avocado VT - implements the 'vt-bootstrap' subcommand
"""
Expand Down
2 changes: 0 additions & 2 deletions avocado_vt/plugins/vt_joblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class LockCreationError(Exception):

"""
Represents any error situation when attempting to create a lock file
"""
Expand All @@ -28,7 +27,6 @@ class LockCreationError(Exception):


class OtherProcessHoldsLockError(Exception):

"""
Represents a condition where other process has the lock
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/plugins/vt_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@


class VTLister(CLI):

"""
Avocado VT - implements legacy virt-test listing
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/plugins/vt_list_archs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class VTListArchs(CLICmd):

"""
Avocado VT - implements vt-list-archs command
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/plugins/vt_list_guests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class VTListGuests(CLICmd):

"""
Avocado VT - implements vt-list-guests command
"""
Expand Down
1 change: 0 additions & 1 deletion avocado_vt/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def cleanup_env(env_filename, env_version):


class VirtTest(test.Test, utils.TestUtils):

"""
Minimal test class used to run a virt test.
"""
Expand Down
1 change: 1 addition & 0 deletions examples/tests/bad_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:difficulty: simple
:copyright: 2014 Red Hat Inc.
"""

from avocado.utils import process


Expand Down
1 change: 1 addition & 0 deletions examples/tests/guest_hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:difficulty: simple
:copyright: 2014 Red Hat Inc.
"""

import logging

LOG = logging.getLogger("avocado.vt.examples.guest_hostname")
Expand Down
1 change: 1 addition & 0 deletions examples/tests/hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:difficulty: simple
:copyright: 2014 Red Hat Inc.
"""

import logging

from avocado.utils import process
Expand Down
1 change: 1 addition & 0 deletions examples/tests/ls_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:difficulty: advanced
:copyright: 2014 Red Hat Inc.
"""

import logging

LOG = logging.getLogger("avocado.vt.examples.lsdisk")
Expand Down
1 change: 1 addition & 0 deletions examples/tests/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:difficulty: advanced
:copyright: 2014 Red Hat Inc.
"""

import logging
import time

Expand Down
2 changes: 1 addition & 1 deletion requirements-travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ inspektor==0.5.3
aexpect>=1.6.4
netifaces==0.11.0
pyenchant==3.2.2
black==22.3.0
black==24.3.0
isort==5.10.1
4 changes: 0 additions & 4 deletions scripts/github/github_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(self, *stuff):


class GithubCache(object):

"""
Auto-refreshing github.GithubObject.GithubObject from dict
"""
Expand Down Expand Up @@ -193,7 +192,6 @@ def cached_data(self):


class GithubIssuesBase(list):

"""
Base class for cached list of github issues
"""
Expand Down Expand Up @@ -318,7 +316,6 @@ def values(self):


class GithubIssues(GithubIssuesBase, object):

"""
Read-only List-like interface to cached github issues in standardized format
"""
Expand Down Expand Up @@ -696,7 +693,6 @@ def __init__(self, key, number):


class MutableIssue(dict):

"""Allow modification of some issue values"""

def __init__(self, github_issues, issue_number):
Expand Down
2 changes: 0 additions & 2 deletions scripts/koji_pkgspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@


class OptionParser(optparse.OptionParser):

"""
KojiPkgSpec App option parser
"""
Expand Down Expand Up @@ -58,7 +57,6 @@ def __init__(self):


class App(object):

"""
KojiPkgSpec app
"""
Expand Down
1 change: 0 additions & 1 deletion scripts/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class AllowBelowSeverity(logging.Filter):

"""
Allows only records less severe than a given level (the opposite of what
the normal logging level filtering does.
Expand Down
1 change: 0 additions & 1 deletion scripts/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def get_test_keyval(jobid, keyname, default=""):


class Sample(object):

"""Collect test results in same environment to a sample"""

def __init__(self, sample_type, arg):
Expand Down
2 changes: 0 additions & 2 deletions scripts/virt_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class OptionParser(optparse.OptionParser):

"""
App option parser
"""
Expand Down Expand Up @@ -82,7 +81,6 @@ def __init__(self):


class App:

"""
Virt Disk Creation App
"""
Expand Down
3 changes: 2 additions & 1 deletion selftests/doc/test_doc_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This is geared towards documentation build regression testing.
"""

import os
import unittest

Expand Down Expand Up @@ -52,7 +53,7 @@ def test_build_docs(self):
"%s ERRORS and/or WARNINGS detected while building the html docs:\n"
% len(failure_lines)
)
for (index, failure_line) in enumerate(failure_lines):
for index, failure_line in enumerate(failure_lines):
e_msg += "%s) %s\n" % (index + 1, failure_line)
e_msg += "Full output: %s\n" % "\n".join(output_lines)
e_msg += "Please check the output and fix your docstrings/.rst docs"
Expand Down
2 changes: 0 additions & 2 deletions selftests/unit/test_libvirt_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@


class NetworkTestBase(unittest.TestCase):

"""
Base class for NetworkXML test providing fake virsh commands.
"""
Expand Down Expand Up @@ -111,7 +110,6 @@ def setUp(self):


class NetworkXMLTest(NetworkTestBase):

"""
Unit test class for manipulator methods in NetworkXML class.
"""
Expand Down
7 changes: 1 addition & 6 deletions selftests/unit/test_qemu_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@


class ParamsDict(dict):

"""params like dictionary"""

def objects(self, item):
Expand All @@ -51,14 +50,13 @@ def objects(self, item):

def object_params(self, obj):
ret = self.copy()
for (param, value) in six.iteritems(self):
for param, value in six.iteritems(self):
if param.endswith("_%s" % obj):
ret[param[: -len("_%s" % obj)]] = value
return ret


class MockHMPMonitor(qemu_monitor.HumanMonitor):

"""Dummy class inherited from qemu_monitor.HumanMonitor"""

def __init__(self): # pylint: disable=W0231
Expand All @@ -69,7 +67,6 @@ def __del__(self):


class Devices(unittest.TestCase):

"""set of qemu devices tests"""

def test_q_base_device(self):
Expand Down Expand Up @@ -151,7 +148,6 @@ def test_q_device(self):


class Buses(unittest.TestCase):

"""Set of bus-representation tests"""

def test_q_sparse_bus(self):
Expand Down Expand Up @@ -671,7 +667,6 @@ def test_usb_bus(self):


class Container(unittest.TestCase):

"""Tests related to the abstract representation of qemu machine"""

def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion selftests/unit/test_qemu_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class MockMonitor(qemu_monitor.Monitor):

"""Dummy class inherited from qemu_monitor.HumanMonitor"""

def __init__(self): # pylint: disable=W0231
Expand Down
6 changes: 1 addition & 5 deletions selftests/unit/test_qemu_qtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

# Dummy classes and functions
class ParamsDict(dict):

"""params like dictionary"""

def objects(self, item):
Expand All @@ -36,7 +35,7 @@ def objects(self, item):

def object_params(self, obj):
ret = self.copy()
for (param, value) in six.iteritems(self):
for param, value in six.iteritems(self):
if param.endswith("_%s" % obj):
ret[param[: -len("_%s" % obj)]] = value
return ret
Expand Down Expand Up @@ -191,7 +190,6 @@ class USB controller, addr 00:04.0, pci id 8086:2934 (sub 1af4:1100)


class QtreeContainerTest(unittest.TestCase):

"""QtreeContainer tests"""

def test_qtree(self):
Expand Down Expand Up @@ -259,7 +257,6 @@ def test_bad_qtree(self):


class QtreeDiskContainerTest(unittest.TestCase):

"""QtreeDiskContainer tests"""

def setUp(self):
Expand Down Expand Up @@ -330,7 +327,6 @@ def test_check_params_bad(self):


class KvmQtreeClassTest(unittest.TestCase):

"""Additional tests for qemu_qtree classes"""

def test_qtree_bus_bus(self):
Expand Down
1 change: 0 additions & 1 deletion virttest/RFBDes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class Des(object):

"""
Base Data Encryption Standard class.
For details, please refer to:
Expand Down
1 change: 0 additions & 1 deletion virttest/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class ConfigLoader:

"""
Base class of the configuration parser
"""
Expand Down
Loading

0 comments on commit a6f1608

Please sign in to comment.