diff options
author | Frederick Muriuki Muriithi | 2023-10-06 11:44:35 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-10-06 11:49:04 +0300 |
commit | 0dfa02d39eeb7abdd9694c4a4829d45c537a2a51 (patch) | |
tree | d423277789b126e8583d3aee7e67fa1d0e7139de /gn3/db | |
parent | 164da23e29354a74e30db7348d93860f3d5b4ea1 (diff) | |
download | genenetwork3-0dfa02d39eeb7abdd9694c4a4829d45c537a2a51.tar.gz |
Make argument mandatory
Make the `base_dir` argument mandatory to force it to be passed in from the
point the function is called.
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/genotypes.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/db/genotypes.py b/gn3/db/genotypes.py index 6f867c7..81efda2 100644 --- a/gn3/db/genotypes.py +++ b/gn3/db/genotypes.py @@ -2,12 +2,12 @@ import os import gzip +from typing import Union +from pathlib import Path -from gn3.settings import GENOTYPE_FILES - -def build_genotype_file( - geno_name: str, base_dir: str = GENOTYPE_FILES, - extension: str = "geno"): +def build_genotype_file(geno_name: str, + base_dir: Union[str, Path], + extension: str = "geno"): """Build the absolute path for the genotype file.""" return f"{os.path.abspath(base_dir)}/{geno_name}.{extension}" |