From caecbe50460bb7a1d6ced20ffb2302e3256b06f4 Mon Sep 17 00:00:00 2001 From: Peter Kroon Date: Thu, 5 Oct 2023 14:46:42 +0200 Subject: [PATCH] Make sure DATA_PATH is always a pathlib.Path --- vermouth/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vermouth/__init__.py b/vermouth/__init__.py index d5df8c95e..b7200aace 100644 --- a/vermouth/__init__.py +++ b/vermouth/__init__.py @@ -37,9 +37,9 @@ import atexit from contextlib import ExitStack except ImportError: - import os - DATA_PATH = os.path.join(os.path.dirname(__file__), 'data') - del os + from pathlib import Path + DATA_PATH = Path(__file__).parent / 'data' + del Path else: ref = files('vermouth') / 'data' file_manager = ExitStack()