Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Nov 21, 2024
1 parent 70cf337 commit 815b9cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions simprod_histogram/calc_depth_to_dataset_dirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path


def calculate(dirpath: str) -> int:
def calculate(dirpath: Path) -> int:
"""
Calculate the filetree depth from dirpath to the dataset directories.
Expand All @@ -25,8 +25,6 @@ def calculate(dirpath: str) -> int:
1. using 'realpath' (ex: /data/sim/IceCube/... -> /mnt/lfs6/sim/IceCube/...)
2: running in a testbed directory (ex: /home/eevans/test/data/sim/IceCube/...)
"""
dirpath = Path(dirpath)

SIM = "sim" # as in '/data/sim' (or a local tree '/home/.../sim/...')
N_SEGMENTS_BASE_TO_DATASET = 5

Expand All @@ -46,4 +44,4 @@ def calculate(dirpath: str) -> int:


if __name__ == "__main__":
print(calculate(sys.argv[1]))
print(calculate(Path(sys.argv[1])))

0 comments on commit 815b9cd

Please sign in to comment.