diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0abcf223..790af707 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - - repo: https://github.com/psf/black - rev: 23.11.0 # Replace by any tag/version: https://github.com/psf/black/tags + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.1 # Replace by any tag/version: https://github.com/psf/black/tags hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ args: ["--line-length", "99"] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: trailing-whitespace exclude: datasets|.data$ diff --git a/yaqc_cmds/__init__.py b/yaqc_cmds/__init__.py index 4965cce4..542c668c 100644 --- a/yaqc_cmds/__init__.py +++ b/yaqc_cmds/__init__.py @@ -1,5 +1,4 @@ """Unified software for controlling hardware and collecting data in the Wright group.""" - from .__version__ import * from .project import * diff --git a/yaqc_cmds/__version__.py b/yaqc_cmds/__version__.py index dc987bbd..744746a6 100644 --- a/yaqc_cmds/__version__.py +++ b/yaqc_cmds/__version__.py @@ -1,10 +1,8 @@ """Define version.""" - import pathlib import subprocess - here = pathlib.Path(__file__).resolve().parent __all__ = ["__version__", "__branch__"] diff --git a/yaqc_cmds/_main_window.py b/yaqc_cmds/_main_window.py index 5a29685b..78823aab 100755 --- a/yaqc_cmds/_main_window.py +++ b/yaqc_cmds/_main_window.py @@ -13,7 +13,6 @@ import os import pathlib - #### import ################################################################### # BEWARE OF CHANGING ORDER OF IMPORTS!!!!!!!!! @@ -33,7 +32,6 @@ import yaqc - ### define #################################################################### diff --git a/yaqc_cmds/hardware/delays.py b/yaqc_cmds/hardware/delays.py index 53defcd1..a1dd47f6 100644 --- a/yaqc_cmds/hardware/delays.py +++ b/yaqc_cmds/hardware/delays.py @@ -16,7 +16,6 @@ import yaqc_cmds.project.classes as pc import yaqc_cmds.hardware.hardware as hw - # --- driver -------------------------------------------------------------------------------------- diff --git a/yaqc_cmds/hardware/hardware.py b/yaqc_cmds/hardware/hardware.py index 862ed031..98fd6066 100644 --- a/yaqc_cmds/hardware/hardware.py +++ b/yaqc_cmds/hardware/hardware.py @@ -1,6 +1,7 @@ """ Parent hardware class and associated. """ + __all__ = ["Driver", "GUI", "Hardware", "import_hardwares"] @@ -23,7 +24,6 @@ from yaqc_cmds.project import widgets as pw from yaqc_cmds.project import project_globals as g - __here__ = pathlib.Path(__file__) diff --git a/yaqc_cmds/hardware/opas.py b/yaqc_cmds/hardware/opas.py index 33af914e..be3ea4cf 100644 --- a/yaqc_cmds/hardware/opas.py +++ b/yaqc_cmds/hardware/opas.py @@ -20,7 +20,6 @@ from yaqc_cmds.hardware import hardware as hw from yaqc_cmds.somatic import signals - ### driver #################################################################### diff --git a/yaqc_cmds/hardware/spectrometers.py b/yaqc_cmds/hardware/spectrometers.py index 7be6461a..82f6e685 100644 --- a/yaqc_cmds/hardware/spectrometers.py +++ b/yaqc_cmds/hardware/spectrometers.py @@ -11,7 +11,6 @@ import toml import yaqc - ### driver #################################################################### diff --git a/yaqc_cmds/project/classes.py b/yaqc_cmds/project/classes.py index d4fb2b28..c2338cb0 100644 --- a/yaqc_cmds/project/classes.py +++ b/yaqc_cmds/project/classes.py @@ -13,7 +13,6 @@ import WrightTools.units as wt_units - __here__ = pathlib.Path(__file__).parent diff --git a/yaqc_cmds/project/file_dialog_handler.py b/yaqc_cmds/project/file_dialog_handler.py index b4e64ff0..579a3a80 100644 --- a/yaqc_cmds/project/file_dialog_handler.py +++ b/yaqc_cmds/project/file_dialog_handler.py @@ -2,7 +2,6 @@ QFileDialog objects can only be run in the main thread. """ - ### imports ################################################################### @@ -15,7 +14,6 @@ from yaqc_cmds.project import project_globals as g from yaqc_cmds.project import classes as pc - ### FileDialog object ######################################################### diff --git a/yaqc_cmds/project/kit.py b/yaqc_cmds/project/kit.py index 6d2310e8..045c7167 100644 --- a/yaqc_cmds/project/kit.py +++ b/yaqc_cmds/project/kit.py @@ -2,13 +2,11 @@ a collection of small, general purpose objects and methods """ - ### import #################################################################### import numpy as np - ### math ###################################################################### diff --git a/yaqc_cmds/project/slack/slack.py b/yaqc_cmds/project/slack/slack.py index 26866641..fcd7a12b 100644 --- a/yaqc_cmds/project/slack/slack.py +++ b/yaqc_cmds/project/slack/slack.py @@ -16,7 +16,6 @@ import yaqc_cmds.project.project_globals as g from . import bots - ### container objects ######################################################### diff --git a/yaqc_cmds/sensors/__init__.py b/yaqc_cmds/sensors/__init__.py index 771b2c4e..6e1c9410 100644 --- a/yaqc_cmds/sensors/__init__.py +++ b/yaqc_cmds/sensors/__init__.py @@ -7,7 +7,6 @@ from ._sensors import Sensor, Driver, SensorWidget import yaqc_cmds.__main__ - sensors = [] config = yaqc_cmds.__main__.config diff --git a/yaqc_cmds/sensors/_sensors.py b/yaqc_cmds/sensors/_sensors.py index fff353e7..0710be72 100644 --- a/yaqc_cmds/sensors/_sensors.py +++ b/yaqc_cmds/sensors/_sensors.py @@ -1,6 +1,5 @@ """Sensors.""" - import appdirs import pathlib import time diff --git a/yaqc_cmds/somatic/_wt5.py b/yaqc_cmds/somatic/_wt5.py index 5c71a813..a48e278d 100644 --- a/yaqc_cmds/somatic/_wt5.py +++ b/yaqc_cmds/somatic/_wt5.py @@ -1,6 +1,5 @@ """wt5 data file functions""" - import time import threading diff --git a/yaqc_cmds/somatic/acquisition.py b/yaqc_cmds/somatic/acquisition.py index e2a8d078..83164f67 100644 --- a/yaqc_cmds/somatic/acquisition.py +++ b/yaqc_cmds/somatic/acquisition.py @@ -2,7 +2,6 @@ Acquisition infrastructure shared by all modules. """ - ### import #################################################################### @@ -40,7 +39,6 @@ from . import constant_resolver - ### define #################################################################### diff --git a/yaqc_cmds/somatic/modules/abstract_tuning.py b/yaqc_cmds/somatic/modules/abstract_tuning.py index 45798822..40af2b3a 100644 --- a/yaqc_cmds/somatic/modules/abstract_tuning.py +++ b/yaqc_cmds/somatic/modules/abstract_tuning.py @@ -32,8 +32,7 @@ def process(self, scan_folder): reference_image=str(pathlib.Path(scan_folder) / self.reference_image), ) - def _process(self, data, curve, channel, gtol, ltol, level, scan_folder, config): - ... + def _process(self, data, curve, channel, gtol, ltol, level, scan_folder, config): ... @property def config_dictionary(self): diff --git a/yaqc_cmds/somatic/modules/home.py b/yaqc_cmds/somatic/modules/home.py index 191e2c66..e23643d5 100644 --- a/yaqc_cmds/somatic/modules/home.py +++ b/yaqc_cmds/somatic/modules/home.py @@ -7,7 +7,6 @@ import somatic.acquisition as acquisition import yaqc_cmds.hardware.opas as opas - ### define #################################################################### diff --git a/yaqc_cmds/somatic/modules/motortune.py b/yaqc_cmds/somatic/modules/motortune.py index c65f6d15..6bce1226 100644 --- a/yaqc_cmds/somatic/modules/motortune.py +++ b/yaqc_cmds/somatic/modules/motortune.py @@ -22,7 +22,6 @@ import yaqc_cmds.sensors as sensors from yaqc_cmds.somatic import _wt5 - ### define #################################################################### diff --git a/yaqc_cmds/somatic/modules/set_shutter.py b/yaqc_cmds/somatic/modules/set_shutter.py index 400ff146..c990b524 100644 --- a/yaqc_cmds/somatic/modules/set_shutter.py +++ b/yaqc_cmds/somatic/modules/set_shutter.py @@ -7,7 +7,6 @@ import yaqc_cmds.somatic.acquisition as acquisition import yaqc_cmds.hardware.opas as opas - ### define #################################################################### diff --git a/yaqc_cmds/somatic/modules/tune_holistic.py b/yaqc_cmds/somatic/modules/tune_holistic.py index 0e7f9775..275c00c1 100644 --- a/yaqc_cmds/somatic/modules/tune_holistic.py +++ b/yaqc_cmds/somatic/modules/tune_holistic.py @@ -4,7 +4,6 @@ import yaqc_cmds.project.classes as pc import yaqc_cmds.hardware.opas as opas - ### define #################################################################### diff --git a/yaqc_cmds/somatic/modules/tune_intensity.py b/yaqc_cmds/somatic/modules/tune_intensity.py index 10dcae3a..816f305e 100644 --- a/yaqc_cmds/somatic/modules/tune_intensity.py +++ b/yaqc_cmds/somatic/modules/tune_intensity.py @@ -3,7 +3,6 @@ import somatic.modules.abstract_tuning as abstract_tuning - module_name = "TUNE INTENSITY" diff --git a/yaqc_cmds/somatic/modules/zero_tune.py b/yaqc_cmds/somatic/modules/zero_tune.py index 0b2eaa95..4865b750 100644 --- a/yaqc_cmds/somatic/modules/zero_tune.py +++ b/yaqc_cmds/somatic/modules/zero_tune.py @@ -26,7 +26,6 @@ all_hardwares = opas.hardwares + spectrometers.hardwares + delays.hardwares + filters.hardwares import yaqc_cmds.devices.devices as devices - ### define ####################################################################