Change settings in flake8 and black.
[python_utils.git] / unittest_utils.py
index b259c6b4c98f687d8e3c8db4b41c280db7ac9d19..f229df75e8b88825d66ca227d7e907d3dc725e1a 100644 (file)
@@ -30,9 +30,7 @@ import function_utils
 import scott_secrets
 
 logger = logging.getLogger(__name__)
-cfg = config.add_commandline_args(
-    f'Logging ({__file__})', 'Args related to function decorators'
-)
+cfg = config.add_commandline_args(f'Logging ({__file__})', 'Args related to function decorators')
 cfg.add_argument(
     '--unittests_ignore_perf',
     action='store_true',
@@ -123,9 +121,7 @@ class DatabasePerfRegressionDataPersister(PerfRegressionDataPersister):
 
     def load_performance_data(self, method_id: str) -> Dict[str, List[float]]:
         results = self.conn.execute(
-            sa.text(
-                f'SELECT * FROM runtimes_by_function WHERE function = "{method_id}";'
-            )
+            sa.text(f'SELECT * FROM runtimes_by_function WHERE function = "{method_id}";')
         )
         ret: Dict[str, List[float]] = {method_id: []}
         for result in results.all():
@@ -165,9 +161,7 @@ def check_method_for_perf_regressions(func: Callable) -> Callable:
             helper = FileBasedPerfRegressionDataPersister(filename)
         elif config.config['unittests_persistance_strategy'] == 'DATABASE':
             dbspec = config.config['unittests_perfdb_spec']
-            dbspec = dbspec.replace(
-                '<PASSWORD>', scott_secrets.MARIADB_UNITTEST_PERF_PASSWORD
-            )
+            dbspec = dbspec.replace('<PASSWORD>', scott_secrets.MARIADB_UNITTEST_PERF_PASSWORD)
             helper = DatabasePerfRegressionDataPersister(dbspec)
         else:
             raise Exception('Unknown/unexpected --unittests_persistance_strategy value')