Skip to content

Commit

Permalink
Removed unzipwalk - now its own package!
Browse files Browse the repository at this point in the history
  • Loading branch information
haukex committed May 22, 2024
1 parent c5fdd84 commit 8683c44
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 280 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pandas
jschon
rfc3986==1.5.0 # this is just to prevent a depencency issue in one of the packages (httpx?) and can maybe be removed in the future
python-dateutil
unzipwalk == 1.0.0
3 changes: 2 additions & 1 deletion safe_filenames_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def list_problems(paths :AnyPaths, *, ignore_compressed :bool = False, ignore_sy
allowed = _base_allowed_chars
if allowed_chars: allowed |= allowed_chars
collections :dict[tuple[PurePath, ...], set[str]] = defaultdict(set)
for fns,bfh,fty in unzipwalk(paths, onlyfiles=False):
for result in unzipwalk(paths):
fns, fty = result.names, result.typ
thefn = fns[-1]
# ##### ##### Type Check ##### #####
if len(fns)==1: # a physical file in the filesystem that we can stat
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_decide_filetype(self):
list( read_records(source=simple_file_source(td/'empty.dat'), metadatas=self.metad) )

def test_read_records_toa5(self):
filesrc = ( x[0:2] for x in unzipwalk(Path(__file__).parent/'toa5') )
filesrc = ( (r.names,r.hnd) for r in unzipwalk(Path(__file__).parent/'toa5') if r.hnd is not None )
got = { "Daily": [], "Hourly": [] }
for rec in read_records(source=filesrc, metadatas=self.metad):
self.assertIsInstance(rec, Toa5Record)
Expand Down
133 changes: 0 additions & 133 deletions tests/test_unzipwalk.py

This file was deleted.

145 changes: 0 additions & 145 deletions unzipwalk.py

This file was deleted.

0 comments on commit 8683c44

Please sign in to comment.