pathlib for concat
All checks were successful
Pytest / pytest (3.14) (push) Successful in 1m13s
Ruff / ruff (push) Successful in 1m0s
Mypy / mypy (push) Successful in 1m45s
Pytest / pytest (3.12) (push) Successful in 1m22s
Pytest / pytest (3.13) (push) Successful in 1m11s

This commit is contained in:
Justus Kuhlmann 2026-05-05 16:26:18 +02:00
commit 93ca059fc0
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
2 changed files with 4 additions and 4 deletions

View file

@ -89,7 +89,7 @@ def set_config(path: Path, section: str, option: str, value: Any) -> None:
value: Any value: Any
The value we set the option to. The value we set the option to.
""" """
config_path = os.path.join(path, CONFIG_FILENAME) config_path = path / CONFIG_FILENAME
config = ConfigParser() config = ConfigParser()
if os.path.exists(config_path): if os.path.exists(config_path):
config.read(config_path) config.read(config_path)
@ -117,7 +117,7 @@ def get_db_file(path: Path) -> Path:
""" """
if not os.path.exists(path): if not os.path.exists(path):
raise FileNotFoundError(f"Corrlib path {path} does not exist.") raise FileNotFoundError(f"Corrlib path {path} does not exist.")
config_path = os.path.join(path, CONFIG_FILENAME) config_path = path / CONFIG_FILENAME
config = ConfigParser() config = ConfigParser()
if os.path.exists(config_path): if os.path.exists(config_path):
config.read(config_path) config.read(config_path)
@ -142,7 +142,7 @@ def cache_enabled(path: Path) -> bool:
cached_bool: bool cached_bool: bool
Whether the given library is cached. Whether the given library is cached.
""" """
config_path = os.path.join(path, CONFIG_FILENAME) config_path = path / CONFIG_FILENAME
config = ConfigParser() config = ConfigParser()
if os.path.exists(config_path): if os.path.exists(config_path):
config.read(config_path) config.read(config_path)

View file

@ -21,7 +21,7 @@ def get_tracker(path: Path) -> str:
tracker: str tracker: str
The tracker used in the dataset. The tracker used in the dataset.
""" """
config_path = os.path.join(path, CONFIG_FILENAME) config_path = path / CONFIG_FILENAME
config = ConfigParser() config = ConfigParser()
if os.path.exists(config_path): if os.path.exists(config_path):
config.read(config_path) config.read(config_path)