commit:     fb4dc9bbf2b51732aa4a254d8ba18c0235f8d70c
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 26 08:36:11 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 26 08:36:11 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=fb4dc9bb

reformat with black 24

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcheck/checks/whitespace.py     |  3 +--
 src/pkgcheck/scripts/pkgcheck_scan.py |  7 ++++---
 tests/scripts/test_pkgcheck_cache.py  | 10 ++++++----
 tests/scripts/test_pkgcheck_replay.py |  9 ++++++---
 4 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/pkgcheck/checks/whitespace.py 
b/src/pkgcheck/checks/whitespace.py
index 9987cf7e..247e8f85 100644
--- a/src/pkgcheck/checks/whitespace.py
+++ b/src/pkgcheck/checks/whitespace.py
@@ -7,8 +7,7 @@ from .. import results, sources
 from . import Check, OptionalCheck
 
 
-class _Whitespace(results.LinesResult, results.Style):
-    ...
+class _Whitespace(results.LinesResult, results.Style): ...
 
 
 class WhitespaceFound(_Whitespace):

diff --git a/src/pkgcheck/scripts/pkgcheck_scan.py 
b/src/pkgcheck/scripts/pkgcheck_scan.py
index c04ff329..7c11f810 100644
--- a/src/pkgcheck/scripts/pkgcheck_scan.py
+++ b/src/pkgcheck/scripts/pkgcheck_scan.py
@@ -371,9 +371,10 @@ def _setup_scan(parser, namespace, args):
     # have to be parsed twice, will probably require a custom snakeoil
     # arghparse method.
     # parse command line args to override config defaults
-    with patch(
-        "pkgcheck.scripts.argparse_actions.ChecksetArgs.__call__", lambda *a, 
**k: None
-    ), patch("pkgcheck.scripts.argparse_actions.ExitArgs.__call__", lambda *a, 
**k: None):
+    with (
+        patch("pkgcheck.scripts.argparse_actions.ChecksetArgs.__call__", 
lambda *a, **k: None),
+        patch("pkgcheck.scripts.argparse_actions.ExitArgs.__call__", lambda 
*a, **k: None),
+    ):
         namespace, _ = parser._parse_known_args(args, namespace)
 
     # Get the current working directory for repo detection and restriction

diff --git a/tests/scripts/test_pkgcheck_cache.py 
b/tests/scripts/test_pkgcheck_cache.py
index 3d9ad139..09c75028 100644
--- a/tests/scripts/test_pkgcheck_cache.py
+++ b/tests/scripts/test_pkgcheck_cache.py
@@ -43,8 +43,9 @@ class TestPkgcheckCache:
 
         # fail to remove it
         for arg in ("-R", "--remove"):
-            with patch("pkgcheck.addons.caches.os.unlink") as unlink, patch(
-                "sys.argv", self.args + [arg] + ["-t", "profiles"]
+            with (
+                patch("pkgcheck.addons.caches.os.unlink") as unlink,
+                patch("sys.argv", self.args + [arg] + ["-t", "profiles"]),
             ):
                 unlink.side_effect = IOError("bad perms")
                 with pytest.raises(SystemExit) as excinfo:
@@ -76,8 +77,9 @@ class TestPkgcheckCache:
                 self.script()
 
         # fail to forcibly remove all
-        with patch("pkgcheck.addons.caches.shutil.rmtree") as rmtree, patch(
-            "sys.argv", self.args + ["-Rf"]
+        with (
+            patch("pkgcheck.addons.caches.shutil.rmtree") as rmtree,
+            patch("sys.argv", self.args + ["-Rf"]),
         ):
             rmtree.side_effect = IOError("bad perms")
             with pytest.raises(SystemExit) as excinfo:

diff --git a/tests/scripts/test_pkgcheck_replay.py 
b/tests/scripts/test_pkgcheck_replay.py
index b6b7d606..0fe32a22 100644
--- a/tests/scripts/test_pkgcheck_replay.py
+++ b/tests/scripts/test_pkgcheck_replay.py
@@ -76,9 +76,12 @@ class TestPkgcheckReplay:
                 reporter.report(ProfileWarning("profile warning: foo"))
             file.seek(0)
 
-            with open(file.name) as stdin, patch("sys.stdin", stdin), patch(
-                "sys.argv", [*self.args, "-R", "StrReporter", "-"]
-            ), pytest.raises(SystemExit) as excinfo:
+            with (
+                open(file.name) as stdin,
+                patch("sys.stdin", stdin),
+                patch("sys.argv", [*self.args, "-R", "StrReporter", "-"]),
+                pytest.raises(SystemExit) as excinfo,
+            ):
                 self.script()
             out, err = capsys.readouterr()
             assert not err

Reply via email to