Skip to content

Commit 0a03331

Browse files
committed
linting
1 parent d8b1f60 commit 0a03331

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/atomate2/abinit/run.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def run_abinit(
6767
process.terminate()
6868

6969
process.wait()
70-
return
7170

7271

7372
def run_mrgddb(
@@ -114,7 +113,6 @@ def run_mrgddb(
114113
process.terminate()
115114

116115
process.wait()
117-
return
118116

119117

120118
def run_anaddb(
@@ -162,4 +160,3 @@ def run_anaddb(
162160
process.terminate()
163161

164162
process.wait()
165-
return

src/atomate2/abinit/schemas/calculation.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def from_abinit_files(
251251
abinit_log_file: Path | str = LOG_FILE_NAME,
252252
abinit_abort_file: Path | str = MPIABORTFILE,
253253
abinit_out_file: Path | str = OUTPUT_FILE_NAME,
254-
) -> tuple[Calculation, dict[AbinitObject, dict]]:
254+
) -> tuple[Self, dict[AbinitObject, dict]]:
255255
"""
256256
Create an Abinit calculation document from a directory and file paths.
257257
@@ -319,15 +319,14 @@ def from_abinit_files(
319319
msg = f"{cls} exception while parsing event_report:\n{exc}"
320320
logger.critical(msg)
321321

322-
return (
323-
cls(
322+
instance = cls(
324323
dir_name=str(dir_name),
325324
task_name=task_name,
326325
abinit_version=abinit_out.version,
327326
has_abinit_completed=has_abinit_completed,
328327
completed_at=completed_at,
329328
output=output_doc,
330329
event_report=report,
331-
),
332-
None, # abinit_objects,
333-
)
330+
)
331+
332+
return instance, None # abinit_objects,

src/atomate2/abinit/schemas/task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from pydantic import BaseModel, Field
1515
from pymatgen.core import Structure
1616
from pymatgen.io.abinit.pseudos import AbinitPseudo
17+
from typing_extensions import Self
1718

1819
from atomate2.abinit.files import load_abinit_input
1920
from atomate2.abinit.schemas.calculation import AbinitObject, Calculation, TaskState

0 commit comments

Comments
 (0)