Skip to content

Commit

Permalink
fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Oct 8, 2024
1 parent 61a6d44 commit bab8775
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions examples/dump_dsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import time
import logging

CHUNKS_PER_PAGE = 8 # chunks_per_page for H5Image
USE_CACHE = False # use_cache setting for h5pyd.File
CHUNKS_PER_PAGE = 8 # chunks_per_page for H5Image
USE_CACHE = False # use_cache setting for h5pyd.File


def is_dataset(obj):
# this should work with either h5py or h5pyd
Expand All @@ -17,6 +18,7 @@ def is_dataset(obj):
else:
return False


def visit(name, obj):
if not is_dataset(obj):
return
Expand All @@ -35,10 +37,10 @@ def visit(name, obj):


def main():

loglevel = logging.ERROR
logging.basicConfig(format='%(asctime)s %(message)s', level=loglevel)

if len(sys.argv) < 2 or sys.argv[1] in ("-h", "--help"):
print(f"usage: python {sys.argv[0]} <file_path>")
sys.exit(1)
Expand Down Expand Up @@ -72,5 +74,6 @@ def main():
stop_time = time.time()
print("")
print(f"done - {(stop_time - start_time):4.3f} s")



main()

0 comments on commit bab8775

Please sign in to comment.