From ba7017edcbcf632490de6810f77daa53c2acf208 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas@kluyver.me.uk>
Date: Wed, 16 Jun 2021 14:31:53 +0100
Subject: [PATCH] isort all .py files

---
 src/cal_tools/agipdlib.py      | 6 +++---
 src/cal_tools/agipdutils.py    | 3 ++-
 src/cal_tools/agipdutils_ff.py | 3 ++-
 src/cal_tools/lpdlib.py        | 3 ++-
 tests/test_agipdutils_ff.py    | 1 +
 tests/test_cal_tools.py        | 9 +++------
 tests/test_webservice.py       | 6 +++++-
 7 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/cal_tools/agipdlib.py b/src/cal_tools/agipdlib.py
index c50a1f19c..6c2142442 100644
--- a/src/cal_tools/agipdlib.py
+++ b/src/cal_tools/agipdlib.py
@@ -7,6 +7,9 @@ from typing import Any, Dict, Optional, Tuple
 import h5py
 import numpy as np
 import sharedmem
+from iCalibrationDB import Conditions, Constants
+
+from cal_tools import agipdalgs as calgs
 from cal_tools.agipdutils import (
     assemble_constant_dict,
     baseline_correct_via_noise,
@@ -19,9 +22,6 @@ from cal_tools.agipdutils import (
 )
 from cal_tools.enums import AgipdGainMode, BadPixels, SnowResolution
 from cal_tools.tools import get_constant_from_db_and_time
-from iCalibrationDB import Conditions, Constants
-
-from cal_tools import agipdalgs as calgs
 
 
 def get_num_cells(fname, loc, module):
diff --git a/src/cal_tools/agipdutils.py b/src/cal_tools/agipdutils.py
index 44cac4c87..8cf5b4f37 100644
--- a/src/cal_tools/agipdutils.py
+++ b/src/cal_tools/agipdutils.py
@@ -2,11 +2,12 @@ import copy
 from typing import Tuple
 
 import numpy as np
-from cal_tools.enums import AgipdGainMode, BadPixels, SnowResolution
 from scipy.signal import cwt, find_peaks_cwt, ricker
 from sklearn.mixture import GaussianMixture
 from sklearn.preprocessing import StandardScaler
 
+from cal_tools.enums import AgipdGainMode, BadPixels, SnowResolution
+
 
 def assemble_constant_dict(
     corr_bools,
diff --git a/src/cal_tools/agipdutils_ff.py b/src/cal_tools/agipdutils_ff.py
index c96093ddf..08923b4d4 100644
--- a/src/cal_tools/agipdutils_ff.py
+++ b/src/cal_tools/agipdutils_ff.py
@@ -1,9 +1,10 @@
 from typing import Any, Dict, List, Optional, Tuple
 
 import numpy as np
-from cal_tools.enums import BadPixelsFF
 from iminuit import Minuit
 
+from cal_tools.enums import BadPixelsFF
+
 
 def any_in(mask: np.ndarray, bits: int) -> bool:
     return mask.astype(np.uint) & bits > 0
diff --git a/src/cal_tools/lpdlib.py b/src/cal_tools/lpdlib.py
index fd0d5132f..217c769fc 100644
--- a/src/cal_tools/lpdlib.py
+++ b/src/cal_tools/lpdlib.py
@@ -3,9 +3,10 @@ from typing import Optional, Tuple
 
 import h5py
 import numpy as np
+from iCalibrationDB import Conditions, Constants, Detectors
+
 from cal_tools.enums import BadPixels
 from cal_tools.tools import get_constant_from_db, get_constant_from_db_and_time
-from iCalibrationDB import Conditions, Constants, Detectors
 
 
 class LpdCorrections:
diff --git a/tests/test_agipdutils_ff.py b/tests/test_agipdutils_ff.py
index 579c905f6..19947eb35 100644
--- a/tests/test_agipdutils_ff.py
+++ b/tests/test_agipdutils_ff.py
@@ -1,4 +1,5 @@
 import numpy as np
+
 from cal_tools.agipdutils_ff import get_mask, set_par_limits
 
 
diff --git a/tests/test_cal_tools.py b/tests/test_cal_tools.py
index 62567e438..a6afb6d35 100644
--- a/tests/test_cal_tools.py
+++ b/tests/test_cal_tools.py
@@ -2,14 +2,11 @@ from datetime import datetime
 from pathlib import Path
 
 import pytest
+from iCalibrationDB import Conditions, Constants
+
 from cal_tools.agipdlib import AgipdCorrections
 from cal_tools.plotting import show_processed_modules
-from cal_tools.tools import (
-    get_dir_creation_date,
-    get_pdu_from_db,
-    module_index_to_qm,
-)
-from iCalibrationDB import Conditions, Constants
+from cal_tools.tools import get_dir_creation_date, get_pdu_from_db, module_index_to_qm
 
 
 def test_show_processed_modules():
diff --git a/tests/test_webservice.py b/tests/test_webservice.py
index 072c38beb..4da6d4252 100644
--- a/tests/test_webservice.py
+++ b/tests/test_webservice.py
@@ -8,7 +8,11 @@ from testpath import MockCommand
 sys.path.insert(0, Path(__file__).parent / 'webservice')
 import webservice  # noqa: import not at top of file
 from webservice.webservice import (  # noqa: import not at top of file
-    check_files, merge, parse_config, run_action, wait_on_transfer
+    check_files,
+    merge,
+    parse_config,
+    run_action,
+    wait_on_transfer,
 )
 
 
-- 
GitLab