Skip to content

Commit

Permalink
Flake8, black, and isort.
Browse files Browse the repository at this point in the history
  • Loading branch information
canismarko committed Jun 7, 2024
1 parent be7a377 commit 90ac005
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/firefly/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from haven import load_config
from haven import load_instrument as load_haven_instrument
from haven import registry
from haven.exceptions import ComponentNotFound
from haven.exceptions import ComponentNotFound, InvalidConfiguration
from haven.instrument.device import titelize

from .main_window import FireflyMainWindow, PlanMainWindow
Expand Down Expand Up @@ -540,8 +540,10 @@ def prepare_queue_client(self, client=None, api=None):
try:
api = queueserver_api()
except InvalidConfiguration:
log.error("Could not load queueserver API "
"configuration from iconfig.toml file.")
log.error(
"Could not load queueserver API "
"configuration from iconfig.toml file."
)
return
# Create the client object
if client is None:
Expand Down
6 changes: 4 additions & 2 deletions src/firefly/queue_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from qtpy.QtCore import QObject, QTimer, Signal

from haven import load_config
from haven.exceptions import UnknownDeviceConfiguration, InvalidConfiguration
from haven.exceptions import InvalidConfiguration

log = logging.getLogger()

Expand All @@ -18,7 +18,9 @@ def queueserver_api():
try:
config = load_config()["queueserver"]
except KeyError:
raise InvalidConfiguration("Could not load queueserver info from iconfig.toml file.")
raise InvalidConfiguration(
"Could not load queueserver info from iconfig.toml file."
)
ctrl_addr = f"tcp://{config['control_host']}:{config['control_port']}"
info_addr = f"tcp://{config['info_host']}:{config['info_port']}"
api = REManagerAPI(zmq_control_addr=ctrl_addr, zmq_info_addr=info_addr)
Expand Down
4 changes: 3 additions & 1 deletion src/haven/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GainOverflow(RuntimeError):

...


class FileNotWritable(IOError):
"""Output file is available but does not have write intent."""

Expand Down Expand Up @@ -55,8 +55,10 @@ class IOCTimeout(RuntimeError):

class InvalidConfiguration(ValueError):
"""The configuration files for Haven are missing keys."""

...


class UnknownDeviceConfiguration(InvalidConfiguration):
"""The configuration for a device does not match the known options."""

Expand Down

0 comments on commit 90ac005

Please sign in to comment.