From f36f92237cd61eec4e0ca3510fc2b5bf8523a841 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Thu, 6 Jul 2023 16:18:49 +0200 Subject: [PATCH] chore: extensions requirements purge --- popmon/extensions/__init__.py | 2 -- popmon/extensions/extension.py | 14 -------------- pyproject.toml | 3 +-- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/popmon/extensions/__init__.py b/popmon/extensions/__init__.py index 0dd04665..2cc37d70 100644 --- a/popmon/extensions/__init__.py +++ b/popmon/extensions/__init__.py @@ -21,5 +21,3 @@ from popmon.extensions.profile_diptest import Diptest extensions = [Diptest()] -for extension in extensions: - extension.check() diff --git a/popmon/extensions/extension.py b/popmon/extensions/extension.py index 6149fbe2..401ccc3d 100644 --- a/popmon/extensions/extension.py +++ b/popmon/extensions/extension.py @@ -18,23 +18,9 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import annotations -import importlib.util from typing import Callable -def is_installed(package) -> bool: - is_present = importlib.util.find_spec(package) - return is_present is not None - - class Extension: name: str extension: Callable - # should also be added to `pyproject.toml` optional-dependencies - requirements: list[str] - - def check(self) -> None: - if all(is_installed(package) for package in self.requirements): - func = self.extension - func = func.__func__ - func() diff --git a/pyproject.toml b/pyproject.toml index 34fe4ddb..fb9db0e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,8 +33,7 @@ dependencies = [ "htmlmin", "pydantic>=2", "pydantic-settings", - "typing_extensions", - "tomli >= 1.1.0 ; python_version < '3.11'" + "typing_extensions" ] classifiers = [ "Programming Language :: Python :: 3",