Skip to content

Commit 2c80829

Browse files
committed
fix undeclared logger in atomate/vasp/analysis/linear_response.py, fix ambiguous file names, flake8 ignore E203, W503
1 parent e376179 commit 2c80829

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

atomate/utils/fileio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def abspath(self, path):
131131
else:
132132
command = f". ./.bashrc; readlink -f {path}"
133133
stdin, stdout, stderr = self.ssh.exec_command(command)
134-
full_path = [l.split("\n")[0] for l in stdout]
134+
full_path = [line.split("\n")[0] for line in stdout]
135135
return full_path[0]
136136

137137
def glob(self, path):
@@ -146,4 +146,4 @@ def glob(self, path):
146146
else:
147147
command = f". ./.bashrc; for i in $(ls {path}); do readlink -f $i; done"
148148
stdin, stdout, stderr = self.ssh.exec_command(command)
149-
return [l.split("\n")[0] for l in stdout]
149+
return [line.split("\n")[0] for line in stdout]

atomate/vasp/analysis/linear_response.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import numpy as np
22
from pymatgen.analysis.magnetism import CollinearMagneticStructureAnalyzer
33

4+
from atomate.utils.utils import get_logger
5+
6+
logger = get_logger(__name__)
7+
48

59
def procure_response_dict(
610
struct_final,

atomate/vasp/firetasks/approx_neb_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_task(self, fw_spec):
6767
{"task_id": t_id, "approx_neb.calc_type": "host"},
6868
{"$push": {"approx_neb.wf_uuids": wf_uuid}},
6969
)
70-
if host_tasks_doc == None:
70+
if host_tasks_doc is None:
7171
raise ValueError(f"Error updating approx neb host with task_id: {t_id}")
7272

7373
# Initialize and store select host task doc fields in approx_neb_doc
@@ -818,7 +818,7 @@ def run_task(self, fw_spec):
818818
},
819819
},
820820
)
821-
if task_doc == None:
821+
if task_doc is None:
822822
raise ValueError(f"Error updating approx neb image with task_id: {t_id}")
823823

824824
# Store info in approx_neb collection for record keeping

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ release = register sdist upload
1212

1313
[flake8]
1414
max-line-length = 125
15+
# E203 whitespace before ':'
16+
# W503 line break before binary operator
17+
ignore = E203, W503
1518
per-file-ignores =
1619
# F401: imported but unused
1720
__init__.py: F401

0 commit comments

Comments
 (0)