Skip to content

Commit 7790f35

Browse files
committed
Fix fussy flake8 errors (NO_JIRA)
1 parent 6b322b6 commit 7790f35

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

notebooks/ccdc_notebook_utilities/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
#
88
# 2022-05-17: created by Jason Cole, The Cambridge Crystallographic Data Centre
99
#
10-
from .run_hermes import run_hermes
11-
from .create_logger import create_logger
10+
from .run_hermes import run_hermes # noqa: F401
11+
from .create_logger import create_logger # noqa: F401

notebooks/ccdc_notebook_utilities/create_logger.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@
77
#
88
# 2022-05-17: created by Jason Cole, The Cambridge Crystallographic Data Centre
99
#
10-
1110
import logging
1211
from platform import platform
1312
import sys
1413
import ccdc.io
1514
import os
16-
1715
"""
1816
From inside a notebook, create a logger and log starting information
1917
"""
2018
def create_logger(verbose = True):
21-
logger = logging.getLogger(__name__)
22-
handler = logging.StreamHandler()
19+
20+
logger=logging.getLogger(__name__)
21+
handler=logging.StreamHandler()
2322
handler.setFormatter(logging.Formatter('[%(asctime)s %(levelname)-7s] %(message)s', datefmt='%y-%m-%d %H:%M:%S'))
2423
logger.addHandler(handler)
2524
logger.setLevel(logging.INFO)
@@ -38,4 +37,4 @@ def create_logger(verbose = True):
3837
CSDHOME: {os.environ.get('CSDHOME', 'Not set')}
3938
CCDC_LICENSING_CONFIGURATION: {os.environ.get('CCDC_LICENSING_CONFIGURATION', 'Not set')}
4039
""")
41-
return logger
40+
return logger

notebooks/ccdc_notebook_utilities/run_hermes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
software is installed alongside the data folder currently.
1919
"""
2020
def run_hermes(*filenames):
21+
2122
try:
22-
hermes_dir = Path( csd_directory() ) / '..' / '..' / 'ccdc-software' / 'hermes'
23-
hermes_exe = (hermes_dir/ 'hermes.exe' if platform().startswith('Windows') else hermes_dir/ 'hermes').as_posix()
23+
hermes_dir = Path(csd_directory()) / '..' / '..' / 'ccdc-software' / 'hermes'
24+
hermes_exe = (hermes_dir / 'hermes.exe' if platform().startswith('Windows') else hermes_dir / 'hermes').as_posix()
2425
_ = Popen([hermes_exe, *filenames], creationflags=0x00000008)
2526
except Exception as e:
26-
print( f"Couldnt run Hermes {e}")
27+
print( f"Couldnt run Hermes {e}")

0 commit comments

Comments
 (0)