From 21e580ec155cf17e969091ba814ba880c7618f36 Mon Sep 17 00:00:00 2001 From: m-rauen Date: Wed, 4 Dec 2024 16:02:10 -0300 Subject: [PATCH] circular import solved + movem from pkg_resources to importlib --- .gitignore | 1 + overreact/__init__.py | 5 +++-- overreact/_misc.py | 2 ++ overreact/coords.py | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ad4a1f17..6443b44f 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,4 @@ poetry.toml pyrightconfig.json # End of https://www.toptal.com/developers/gitignore/api/python +testando/ diff --git a/overreact/__init__.py b/overreact/__init__.py index 347a058a..b77a5b2b 100644 --- a/overreact/__init__.py +++ b/overreact/__init__.py @@ -4,7 +4,8 @@ __docformat__ = "restructuredtext" -import pkg_resources as _pkg_resources +#import pkg_resources as _pkg_resources +from importlib.metadata import version from overreact.api import ( get_enthalpies, @@ -48,7 +49,7 @@ "unparse_reactions", ] -__version__ = _pkg_resources.get_distribution(__name__).version +__version__ = version(__name__) __license__ = "MIT" # I'm too lazy to get it from setup.py... __headline__ = "📈 Create and analyze chemical microkinetic models built from computational chemistry data." diff --git a/overreact/_misc.py b/overreact/_misc.py index 82a3ae44..2cf3ba8d 100644 --- a/overreact/_misc.py +++ b/overreact/_misc.py @@ -16,6 +16,8 @@ from overreact import _constants as constants def ignore_unhashable(func): + """ + """ uncached = func.__wrapped__ attributes = functools.WRAPPER_ASSIGNMENTS + ('cache_info', 'cache_clear') @functools.wraps(func, assigned=attributes) diff --git a/overreact/coords.py b/overreact/coords.py index 9603bb48..6a27dc48 100644 --- a/overreact/coords.py +++ b/overreact/coords.py @@ -18,6 +18,7 @@ import overreact as rx from overreact import _constants as constants +from overreact import _misc as _misc logger = logging.getLogger(__name__)