File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,16 +120,18 @@ def __init__(
120120 self ._rows_per_file = rows_per_file
121121 self ._compression = compression
122122
123+ @classmethod
124+ def load (cls , path : str | Path ):
125+ path = Path (path )
126+
123127 # validate path
124- if not self . _path .exists ():
125- raise FileNotFoundError (f"Directory does not exist: { self . _path } " )
126- elif not self . _path .is_dir ():
128+ if not path .exists ():
129+ raise FileNotFoundError (f"Directory does not exist: { path } " )
130+ elif not path .is_dir ():
127131 raise NotADirectoryError (
128- f"Path exists but is not a directory: { self . _path } "
132+ f"Path exists but is not a directory: { path } "
129133 )
130134
131- @classmethod
132- def load (cls , path : str | Path ):
133135 def _retrieve (config : dict , key : str ):
134136 if value := config .get (key , None ):
135137 return value
You can’t perform that action at this time.
0 commit comments