Support mixed case model package names (#10223)

This commit is contained in:
Adriane Boyd 2022-02-08 10:52:46 +01:00 committed by GitHub
parent f939da0bfa
commit a9ee5bff98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -871,7 +871,6 @@ def get_package_path(name: str) -> Path:
name (str): Package name. name (str): Package name.
RETURNS (Path): Path to installed package. RETURNS (Path): Path to installed package.
""" """
name = name.lower() # use lowercase version to be safe
# Here we're importing the module just to find it. This is worryingly # Here we're importing the module just to find it. This is worryingly
# indirect, but it's otherwise very difficult to find the package. # indirect, but it's otherwise very difficult to find the package.
pkg = importlib.import_module(name) pkg = importlib.import_module(name)