[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/m12] fix: Reformat docstrings for black



commit f3c07f29f18a25505278d09c62823b2993244cfe
Author: juga0 <juga@xxxxxxxxxx>
Date:   Fri Apr 30 09:18:56 2021 +0000

    fix: Reformat docstrings for black
    
    To pass tox tests.
    This seems to have changed in black from version 20.8b1 to 21.4b2.
---
 sbws/globals.py               | 2 +-
 sbws/lib/resultdump.py        | 4 ++--
 tests/integration/conftest.py | 1 -
 tests/unit/conftest.py        | 1 -
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sbws/globals.py b/sbws/globals.py
index 4136970..6954fd1 100644
--- a/sbws/globals.py
+++ b/sbws/globals.py
@@ -191,7 +191,7 @@ MAX_RECENT_PRIORITY_RELAY_COUNT = (
 
 
 def fail_hard(*a, **kw):
-    """ Log something ... and then exit as fast as possible """
+    """Log something ... and then exit as fast as possible"""
     log.critical(*a, **kw)
     exit(1)
 
diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py
index b168cbd..33292d4 100644
--- a/sbws/lib/resultdump.py
+++ b/sbws/lib/resultdump.py
@@ -191,7 +191,7 @@ def load_recent_results_in_datadir(
 
 
 def write_result_to_datadir(result, datadir):
-    """ Can be called from any thread """
+    """Can be called from any thread"""
     assert isinstance(result, Result)
     assert os.path.isdir(datadir)
     dt = datetime.utcfromtimestamp(result.time)
@@ -852,7 +852,7 @@ class ResultDump:
             fail_hard(e)
 
     def store_result(self, result):
-        """ Call from ResultDump thread """
+        """Call from ResultDump thread"""
         assert isinstance(result, Result)
         with self.data_lock:
             fp = result.fingerprint
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
index c90a788..9a08fca 100644
--- a/tests/integration/conftest.py
+++ b/tests/integration/conftest.py
@@ -52,7 +52,6 @@ def sbwshome_dir(sbwshome_empty):
 
 @pytest.fixture(scope="session")
 def test_config_path(tmpdir):
-    """"""
     config = tmpdir.join(".sbws.ini")
     return config
 
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index da6a90d..79d8f37 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -207,7 +207,6 @@ def sbwshome_only_datadir(sbwshome_empty):
 
 @pytest.fixture(scope="function")
 def test_config_path(tmpdir):
-    """"""
     config = tmpdir.join(".sbws.ini")
     return config
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits