Fix: recursive call for extract_sources
This commit is contained in:
parent
d0961b0909
commit
dec284bde1
@ -28,7 +28,7 @@ class ExcelSource(Source):
|
||||
|
||||
|
||||
class CSVSource(Source):
|
||||
options: dict
|
||||
options: dict = {}
|
||||
|
||||
def get_df(self, base_path: Path) -> pd.DataFrame:
|
||||
filepath = base_path / self.filename
|
||||
@ -76,7 +76,8 @@ def extract_sources(sources: list[Source], base_path: Path = Path()):
|
||||
for src in sources:
|
||||
if "*" in src.filename:
|
||||
expanded_src = [
|
||||
src.model_copy(update={"filename": p}) for p in Path.glob(src.filename)
|
||||
src.model_copy(update={"filename": str(p.relative_to(base_path))})
|
||||
for p in base_path.glob(src.filename)
|
||||
]
|
||||
yield from extract_sources(expanded_src, base_path)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user