Fix Annotated import error (#120)
fix typing Co-authored-by: wangzy <wangziyi@pjlab.org.cn>
This commit is contained in:
@@ -4,7 +4,12 @@ import re
|
||||
from abc import ABCMeta
|
||||
from copy import deepcopy
|
||||
from functools import wraps
|
||||
from typing import Annotated, Callable, Optional, Type, get_args, get_origin
|
||||
from typing import Callable, Optional, Type, get_args, get_origin
|
||||
|
||||
try:
|
||||
from typing import Annotated
|
||||
except ImportError:
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from class_registry import AutoRegister, ClassRegistry
|
||||
from griffe import Docstring
|
||||
|
||||
@@ -9,3 +9,4 @@ jupyter
|
||||
jupyter_client
|
||||
json5
|
||||
pillow
|
||||
typing-extensions
|
||||
|
||||
Reference in New Issue
Block a user