diff --git a/typing_inspect.py b/typing_inspect.py index 0268b16..90199ba 100644 --- a/typing_inspect.py +++ b/typing_inspect.py @@ -408,13 +408,16 @@ def get_parameters(tp): else: return () elif NEW_TYPING: - if ( + if is_tuple_type(tp): + return tp.__parameters__ if hasattr(tp, "__parameters__") else () + elif ( ( isinstance(tp, typingGenericAlias) and hasattr(tp, '__parameters__') ) or isinstance(tp, type) and issubclass(tp, Generic) and tp is not Generic): + return tp.__parameters__ else: return ()