From faa2061bcfb43d92b87b3c62a4c7fc85640a749d Mon Sep 17 00:00:00 2001 From: Christian Darsow-Fromm <cdarsowf@physnet.uni-hamburg.de> Date: Mon, 13 Jan 2020 21:35:19 +0100 Subject: [PATCH] black --- src/openqlab/analysis/cavity.py | 4 ++-- src/openqlab/io/importers/keysight_visa.py | 7 +------ .../test_io/test_importers/test_gwinstek/test_gwinstek.py | 5 +---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/openqlab/analysis/cavity.py b/src/openqlab/analysis/cavity.py index 02e7c06..8b57c25 100644 --- a/src/openqlab/analysis/cavity.py +++ b/src/openqlab/analysis/cavity.py @@ -227,7 +227,7 @@ def linewidth( plt.figure() plt.plot( - plot_frequency, data["Error_filtered"], marker="x", label="Error function", + plot_frequency, data["Error_filtered"], marker="x", label="Error function" ) plt.plot(plot_frequency, data["Error_gradient"], ls="-", label="Gradient") plt.plot( @@ -242,7 +242,7 @@ def linewidth( plt.figure() # pylint: disable=unused-variable plt.plot( - plot_frequency_window, data_offset, linestyle=" ", marker=".", label="data", + plot_frequency_window, data_offset, linestyle=" ", marker=".", label="data" ) plt.plot(plot_frequency_window, fit, label="fit") diff --git a/src/openqlab/io/importers/keysight_visa.py b/src/openqlab/io/importers/keysight_visa.py index 952c402..e766e79 100644 --- a/src/openqlab/io/importers/keysight_visa.py +++ b/src/openqlab/io/importers/keysight_visa.py @@ -57,12 +57,7 @@ class KeysightVisa(VisaImporter): preamble = self.query("WAV:PREamble?").strip() entries = preamble.split(",") - type_dict = { - 0: "normal", - 1: "peak detect", - 2: "average", - 3: "hresolution", - } + type_dict = {0: "normal", 1: "peak detect", 2: "average", 3: "hresolution"} self._header = dict( # format=entries[0], diff --git a/src/tests/test_io/test_importers/test_gwinstek/test_gwinstek.py b/src/tests/test_io/test_importers/test_gwinstek/test_gwinstek.py index 617641d..b82ed6f 100644 --- a/src/tests/test_io/test_importers/test_gwinstek/test_gwinstek.py +++ b/src/tests/test_io/test_importers/test_gwinstek/test_gwinstek.py @@ -54,10 +54,7 @@ class TestGwinstek(unittest.TestCase): raise AssertionError(f"{file} did not raise {UnknownFileType}") from e def test_missing_data(self): - files = [ - filedir / "missing_data.csv", - filedir / "missing_data_1.csv", - ] + files = [filedir / "missing_data.csv", filedir / "missing_data_1.csv"] for file in files: try: with self.assertRaises(EmptyDataError): -- GitLab