File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -5803,18 +5803,16 @@ def __init__(self, dirname: str | Path):
58035803 dirname: The directory containing the VASP calculation as a string or Path.
58045804 """
58055805 self .path = Path (dirname ).absolute ()
5806-
5807- # Note that py3.12 has Path.walk(). But we need to use os.walk to ensure backwards compatibility for now.
5808- self .files = [str (Path (d ) / f ).lstrip (str (self .path )) for d , _ , fnames in os .walk (self .path ) for f in fnames ]
5809- self ._parsed_files : dict [str , Any ] = {}
5806+ self .reset ()
58105807
58115808 def reset (self ):
58125809 """
58135810 Reset all loaded files and recheck the directory for files. Use this when the contents of the directory has
58145811 changed.
58155812 """
5813+ # Note that py3.12 has Path.walk(). But we need to use os.walk to ensure backwards compatibility for now.
58165814 self .files = [str (Path (d ) / f ).lstrip (str (self .path )) for d , _ , fnames in os .walk (self .path ) for f in fnames ]
5817- self ._parsed_files = {}
5815+ self ._parsed_files : dict [ str , Any ] = {}
58185816
58195817 def __len__ (self ):
58205818 return len (self .files )
You can’t perform that action at this time.
0 commit comments