Skip to content

Commit

Permalink
add more type
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Nov 5, 2024
1 parent 51c18ea commit 5c40d03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pymatgen/apps/borg/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ def __init__(self, inc_structure=False, parameters=None, data=None, file_extensi

self._file_extensions = file_extensions

def __str__(self) -> Literal["GaussianToComputedEntryDrone"]:
return "GaussianToComputedEntryDrone"

def assimilate(self, path):
"""Assimilate data in a directory path into a ComputedEntry object.
Expand Down Expand Up @@ -411,10 +414,7 @@ def get_valid_paths(self, path):
parent, _subdirs, files = path
return [os.path.join(parent, file) for file in files if os.path.splitext(file)[1] in self._file_extensions]

def __str__(self):
return " GaussianToComputedEntryDrone"

def as_dict(self):
def as_dict(self) -> dict[str, Any]:
"""Get MSONable dict."""
return {
"init_args": {
Expand All @@ -428,7 +428,7 @@ def as_dict(self):
}

@classmethod
def from_dict(cls, dct: dict) -> Self:
def from_dict(cls, dct: dict[str, Any]) -> Self:
"""
Args:
dct (dict): Dict Representation.
Expand Down

0 comments on commit 5c40d03

Please sign in to comment.