diff --git a/poetry.lock b/poetry.lock index cfad04b..208f6bb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1073,13 +1073,13 @@ files = [ [[package]] name = "pyright" -version = "1.1.352" +version = "1.1.353" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.352-py3-none-any.whl", hash = "sha256:0040cf173c6a60704e553bfd129dfe54de59cc76d0b2b80f77cfab4f50701d64"}, - {file = "pyright-1.1.352.tar.gz", hash = "sha256:a621c0dfbcf1291b3610641a07380fefaa1d0e182890a1b2a7f13b446e8109a9"}, + {file = "pyright-1.1.353-py3-none-any.whl", hash = "sha256:8d7e6719d0be4fd9f4a37f010237c6a74d91ec1e7c81de634c2f3f9965f8ab43"}, + {file = "pyright-1.1.353.tar.gz", hash = "sha256:24343bbc2a4f997563f966b6244a2e863473f1d85af6d24abcb366fcbb4abca9"}, ] [package.dependencies] diff --git a/sachi/config.py b/sachi/config.py index 2fa882f..b9e2f6d 100644 --- a/sachi/config.py +++ b/sachi/config.py @@ -8,6 +8,8 @@ def get_config_path() -> Path: + if __package__ is None: + raise ImportError("This module must be imported as a package") pkg_meta = metadata(__package__) app_dir = Path(typer.get_app_dir(pkg_meta["Name"])) app_dir.mkdir(parents=True, exist_ok=True)