Skip to content

Commit 2771613

Browse files
committed
remove noop get_valid_paths()
also fix staticmethod using self
1 parent d3075bb commit 2771613

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

atomate/common/firetasks/tests/test_parse_outputs.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ def __init__(self):
2121
def assimilate(self, path):
2222
return {"drone": "Test Drone", "dir_name": "/test", "state": "successful"}
2323

24-
def get_valid_paths(self, path):
25-
return path
26-
2724

2825
class TestToDbTask(AtomateTest):
2926
def test_ToDbTask(self):

atomate/lammps/drones.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def assimilate(
8383
dump_files = [dump_files] if isinstance(dump_files, str) else dump_files
8484

8585
# input set
86-
lmps_input = LammpsInputSet.from_file(
86+
lmps_input = LammpsInputSet.from_file( # noqa: F821
8787
"lammps", input_file, {}, data_file, data_filename
8888
)
8989

@@ -94,7 +94,7 @@ def assimilate(
9494
dumps.append((df, LammpsDump.from_file(os.path.join(path, df))))
9595

9696
# log
97-
log = LammpsLog(log_file=log_file)
97+
log = LammpsLog(log_file=log_file) # noqa: F821
9898

9999
logger.info(f"Getting task doc for base dir :{path}")
100100
d = self.generate_doc(path, lmps_input, log, dumps)
@@ -163,9 +163,6 @@ def generate_doc(self, dir_name, lmps_input, log, dumps):
163163
)
164164
return None
165165

166-
def get_valid_paths(self, path):
167-
return [path]
168-
169166
def as_dict(self):
170167
init_args = {
171168
"additional_fields": self.additional_fields,

atomate/qchem/drones.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,3 @@ def validate_doc(self, d):
503503
diff = v.difference(set(d.get(k, d).keys()))
504504
if diff:
505505
logger.warning(f"The keys {diff} in {k} not set")
506-
507-
@staticmethod
508-
def get_valid_paths(self, path):
509-
return [path]

atomate/vasp/firetasks/lobster_tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ def __init__(self, *args, **kwargs):
231231
f"Check that you did not misspell it."
232232
)
233233

234-
def _find_gz_file(self, filename):
234+
@staticmethod
235+
def _find_gz_file(filename):
235236
gz_filename = filename + ".gz"
236237
if os.path.exists(gz_filename):
237238
return gz_filename

0 commit comments

Comments
 (0)