fix(utils.py): fix python 3.8 linting error

This commit is contained in:
Krrish Dholakia 2024-05-14 11:25:36 -07:00
parent 151902f7d9
commit f41b2a09a4

View file

@ -43,10 +43,8 @@ try:
# New and recommended way to access resources # New and recommended way to access resources
from importlib import resources from importlib import resources
filename = str( filename = str(resources.files(litellm).joinpath("llms/tokenizers"))
resources.files(litellm).joinpath("llms/tokenizers") except (ImportError, AttributeError):
)
except ImportError:
# Old way to access resources, which setuptools deprecated some time ago # Old way to access resources, which setuptools deprecated some time ago
import pkg_resources # type: ignore import pkg_resources # type: ignore