Coverage for tld/helpers.py: 100%
10 statements
« prev ^ index » next coverage.py v7.2.7, created at 2024-05-26 22:29 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2024-05-26 22:29 +0000
1from os.path import abspath, join
3from .conf import get_setting
5__author__ = "Artur Barseghyan"
6__copyright__ = "2013-2023 Artur Barseghyan"
7__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
8__all__ = (
9 "project_dir",
10 "PROJECT_DIR",
11)
14def project_dir(base: str) -> str:
15 """Project dir."""
16 tld_names_local_path_parent = get_setting("NAMES_LOCAL_PATH_PARENT")
17 return abspath(join(tld_names_local_path_parent, base).replace("\\", "/"))
20PROJECT_DIR = project_dir