From 0dfa02d39eeb7abdd9694c4a4829d45c537a2a51 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 6 Oct 2023 11:44:35 +0300 Subject: Make argument mandatory Make the `base_dir` argument mandatory to force it to be passed in from the point the function is called. --- gn3/db/genotypes.py | 10 +++++----- 1 file 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}" -- cgit 1.4.1