Skip to content

Commit

Permalink
refactor: PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
jswift-stfc committed Mar 15, 2022
1 parent 37b2651 commit d1b4b28
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/gudrun_classes/gudrun_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,11 @@ def dcs(self, path='', headless=True):
if hasattr(sys, '_MEIPASS'):
gudrun_dcs = os.path.join(sys._MEIPASS, f"gudrun_dcs{SUFFIX}")
else:
gudrun_dcs = resolve(os.path.join(config.__rootdir__, "bin"), f"gudrun_dcs{SUFFIX}")
gudrun_dcs = resolve(
os.path.join(
config.__rootdir__, "bin"
), f"gudrun_dcs{SUFFIX}"
)
if not os.path.exists(gudrun_dcs):
return FileNotFoundError()
else:
Expand Down
6 changes: 5 additions & 1 deletion src/gudrun_classes/purge_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ def purge(
if hasattr(sys, '_MEIPASS'):
purge_det = os.path.join(sys._MEIPASS, f"purge_det{SUFFIX}")
else:
purge_det = resolve(os.path.join(config.__rootdir__, "bin"), f"purge_det{SUFFIX}")
purge_det = resolve(
os.path.join(
config.__rootdir__, "bin"
), f"purge_det{SUFFIX}"
)
if not os.path.exists(purge_det):
return FileNotFoundError()
proc = QProcess()
Expand Down
9 changes: 7 additions & 2 deletions src/gui/widgets/dialogs/configuration_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
from src.gudrun_classes import config


class ConfigurationDialog(QDialog):
"""
Class to represent the ConfigurationDialog. Inherits QDialog.
Expand Down Expand Up @@ -64,7 +65,9 @@ def loadConfigurations(self):
targetDir = (
os.path.join(sys._MEIPASS, "bin", "configs", "instruments")
if hasattr(sys, "_MEIPASS")
else os.path.join(config.__rootdir__, "bin", "configs", "instruments")
else os.path.join(
config.__rootdir__, "bin", "configs", "instruments"
)
)
self.widget.configList.addItems(
[
Expand All @@ -78,7 +81,9 @@ def setConfiguration(self, _prev, _curr):
targetDir = (
os.path.join(sys._MEIPASS, "bin", "configs", "instruments")
if hasattr(sys, "_MEIPASS")
else os.path.join(config.__rootdir__, "bin", "configs", "instruments")
else os.path.join(
config.__rootdir__, "bin", "configs", "instruments"
)
)
self.configuration = os.path.abspath(
os.path.join(
Expand Down

0 comments on commit d1b4b28

Please sign in to comment.