-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6823a12
commit 5fd5f44
Showing
1 changed file
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import sys | ||
|
||
|
||
if sys.version_info >= (3, 10, 2): | ||
from importlib import metadata # type: ignore[attr-defined] | ||
if sys.version_info < (3, 8): | ||
import importlib_metadata as metadata | ||
elif sys.version_info >= (3, 10, 2): | ||
from importlib import metadata | ||
else: | ||
try: | ||
import importlib_metadata as metadata | ||
except ModuleNotFoundError: | ||
# helps bootstrapping when dependencies aren't installed | ||
from importlib import metadata # type: ignore[attr-defined] | ||
from importlib import metadata | ||
|
||
__all__ = ['metadata'] |