Skip to content

Commit

Permalink
fix: remove ignore_error from kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
link89 committed Oct 16, 2024
1 parent f7aaa21 commit 60b468c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ai2_kit/tool/dpdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def read(*file_path_or_glob: str, **kwargs):
:param kwargs: arguments to pass to dpdata.System or dpdata.LabeledSystem
"""
kwargs.setdefault('fmt', 'deepmd/npy')
ignore_error = kwargs.setdefault('ignore_error', False)
ignore_error = kwargs.pop('ignore_error', False)
files = expand_globs(file_path_or_glob)
if len(files) == 0:
raise FileNotFoundError(f'No file found in {file_path_or_glob}')
Expand Down Expand Up @@ -237,4 +237,4 @@ def _read(data_path: str, **kwargs):
if fparam is not None:
set_fparam(system, fparam)

return system
return system

0 comments on commit 60b468c

Please sign in to comment.