From 655231ba5210ede2e4a738da54dfd2b4c89772f7 Mon Sep 17 00:00:00 2001 From: "D. V. Wiebe" Date: Fri, 17 Jan 2025 16:49:49 -0800 Subject: [PATCH] re-blacken --- dias/__init__.py | 1 + dias/analyzer.py | 1 + dias/analyzers/__init__.py | 1 + dias/analyzers/daily_ringmaps.py | 1 + dias/analyzers/feedpositions_analyzer.py | 1 + dias/analyzers/find_jump_analyzer.py | 1 + dias/analyzers/flag_rfi_analyzer.py | 1 + dias/analyzers/sample_analyzer.py | 1 - dias/analyzers/sensitivity_analyzer.py | 4 +--- dias/analyzers/test_analyzer.py | 1 + dias/config_loader.py | 1 + dias/job.py | 1 + dias/scheduler.py | 1 + dias/task.py | 1 + dias/task_queue.py | 1 + dias/utils/__init__.py | 1 + dias/utils/string_converter.py | 3 ++- 17 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dias/__init__.py b/dias/__init__.py index 732d0a45..94f44f6c 100644 --- a/dias/__init__.py +++ b/dias/__init__.py @@ -1,4 +1,5 @@ """dias, a data integrity analysis system.""" + from .exception import DiasException, DiasUsageError, DiasConfigError from .exception import DiasConcurrencyError from .analyzer import Analyzer diff --git a/dias/analyzer.py b/dias/analyzer.py index b9216323..c9e3b43e 100644 --- a/dias/analyzer.py +++ b/dias/analyzer.py @@ -1,4 +1,5 @@ """Analyzer Base Class.""" + import logging import os import re diff --git a/dias/analyzers/__init__.py b/dias/analyzers/__init__.py index 8cd33da4..717a9b4d 100644 --- a/dias/analyzers/__init__.py +++ b/dias/analyzers/__init__.py @@ -1,4 +1,5 @@ """Analyzers for dias.""" + from .feedpositions_analyzer import FeedpositionsAnalyzer from .sample_analyzer import SampleAnalyzer from .test_analyzer import TestAnalyzer diff --git a/dias/analyzers/daily_ringmaps.py b/dias/analyzers/daily_ringmaps.py index 2a4299ee..9c918e52 100644 --- a/dias/analyzers/daily_ringmaps.py +++ b/dias/analyzers/daily_ringmaps.py @@ -1,4 +1,5 @@ """Analyzer to retrieve and store daily ringmaps.""" + import numpy as np import requests import msgpack diff --git a/dias/analyzers/feedpositions_analyzer.py b/dias/analyzers/feedpositions_analyzer.py index d115e4fe..e97f22b7 100644 --- a/dias/analyzers/feedpositions_analyzer.py +++ b/dias/analyzers/feedpositions_analyzer.py @@ -3,6 +3,7 @@ Note: This analyzer has been turned off since 2021-01-21. """ + from dias import CHIMEAnalyzer, DiasConfigError from datetime import datetime, timedelta from caput import config, time diff --git a/dias/analyzers/find_jump_analyzer.py b/dias/analyzers/find_jump_analyzer.py index 338c1f25..543a4edf 100644 --- a/dias/analyzers/find_jump_analyzer.py +++ b/dias/analyzers/find_jump_analyzer.py @@ -21,6 +21,7 @@ finger_finder """ + import os import time import datetime diff --git a/dias/analyzers/flag_rfi_analyzer.py b/dias/analyzers/flag_rfi_analyzer.py index b7b3db8a..ea996650 100644 --- a/dias/analyzers/flag_rfi_analyzer.py +++ b/dias/analyzers/flag_rfi_analyzer.py @@ -18,6 +18,7 @@ :toctree: generated/ """ + import os import time import datetime diff --git a/dias/analyzers/sample_analyzer.py b/dias/analyzers/sample_analyzer.py index ffe06c2b..cccdf90f 100644 --- a/dias/analyzers/sample_analyzer.py +++ b/dias/analyzers/sample_analyzer.py @@ -3,7 +3,6 @@ This is a basic example for how to write an analyzer for dias. """ - from dias import CHIMEAnalyzer from datetime import datetime from caput import config diff --git a/dias/analyzers/sensitivity_analyzer.py b/dias/analyzers/sensitivity_analyzer.py index 063106ff..314582e9 100644 --- a/dias/analyzers/sensitivity_analyzer.py +++ b/dias/analyzers/sensitivity_analyzer.py @@ -243,9 +243,7 @@ def run(self): ): cnt[ss, :] += flag_ind[pp[0], :] * flag_ind[pp[1], :] else: - for ss, val in Counter( - data.reverse_map["stack"]["stack"][:] - ).items(): + for ss, val in Counter(data.reverse_map["stack"]["stack"][:]).items(): cnt[ss, :] = val # Initialize arrays diff --git a/dias/analyzers/test_analyzer.py b/dias/analyzers/test_analyzer.py index db3eb9b1..a7ad00da 100644 --- a/dias/analyzers/test_analyzer.py +++ b/dias/analyzers/test_analyzer.py @@ -1,4 +1,5 @@ """Analyzer to test the dias scheduler.""" + from dias import Analyzer from dias.utils import str2timedelta from time import sleep diff --git a/dias/config_loader.py b/dias/config_loader.py index 6b1fff7d..1912d521 100644 --- a/dias/config_loader.py +++ b/dias/config_loader.py @@ -1,4 +1,5 @@ """dias config loader.""" + import importlib import logging import yaml diff --git a/dias/job.py b/dias/job.py index df15d6f2..d63a299c 100644 --- a/dias/job.py +++ b/dias/job.py @@ -1,4 +1,5 @@ """dias Job.""" + from dias import DiasConcurrencyError diff --git a/dias/scheduler.py b/dias/scheduler.py index 8f6df56f..0060453d 100644 --- a/dias/scheduler.py +++ b/dias/scheduler.py @@ -1,4 +1,5 @@ """dias Scheduler.""" + import concurrent.futures import logging import threading diff --git a/dias/task.py b/dias/task.py index 18f89a10..eaa66842 100644 --- a/dias/task.py +++ b/dias/task.py @@ -1,4 +1,5 @@ """dias Task.""" + import os import random import traceback diff --git a/dias/task_queue.py b/dias/task_queue.py index 27b3014d..56d7e579 100644 --- a/dias/task_queue.py +++ b/dias/task_queue.py @@ -1,4 +1,5 @@ """dias task queue.""" + import threading diff --git a/dias/utils/__init__.py b/dias/utils/__init__.py index 6ab611cb..41342b28 100644 --- a/dias/utils/__init__.py +++ b/dias/utils/__init__.py @@ -1,4 +1,5 @@ """Utilities for dias.""" + from .string_converter import * from .helpers import * from .tracker import * diff --git a/dias/utils/string_converter.py b/dias/utils/string_converter.py index 43f8fe26..116504a0 100644 --- a/dias/utils/string_converter.py +++ b/dias/utils/string_converter.py @@ -1,4 +1,5 @@ """Helper functions to convert to and from strings.""" + from dias.exception import DiasException import os @@ -42,7 +43,7 @@ def str2timedelta(time_str): return parts = parts.groupdict() time_params = {} - for (name, param) in parts.items(): + for name, param in parts.items(): if param: time_params[name] = int(param) if not time_params: