fix: update Environment initialization in Explainable class and clean up test imports
This commit is contained in:
parent
12c078cd72
commit
4e1d9cd620
@ -28,7 +28,7 @@ class Explainable:
|
||||
|
||||
@classmethod
|
||||
def use_env(path: str = ".env"):
|
||||
env = Environment(path)
|
||||
env = Environment(env_file_name=path)
|
||||
Explainable.API_KEY = env.get("OPENAPI_KEY")
|
||||
|
||||
@classmethod
|
||||
|
||||
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='multinut',
|
||||
version='0.3.1',
|
||||
version='0.3.2',
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
"requests>=2.25.0",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from multinut.explain import Explainable, hello
|
||||
from multinut.explain import Explainable
|
||||
|
||||
class MyClass(Explainable):
|
||||
def my_method(self, x):
|
||||
@ -8,6 +8,7 @@ class MyClass(Explainable):
|
||||
def another(self, msg: str):
|
||||
return msg[::-1]
|
||||
|
||||
Explainable.use_env()
|
||||
|
||||
print("=== Class Explanation ===")
|
||||
print(MyClass.explain())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user