@@ -1022,7 +1022,7 @@ def verify_typealias(
1022
1022
if not isinstance (runtime_type , type ):
1023
1023
yield Error (
1024
1024
object_path , "is inconsistent: runtime is not a type" , stub , runtime ,
1025
- stub_desc = str ( stub_target )
1025
+ stub_desc = f"Type alias for: { stub_target } "
1026
1026
)
1027
1027
return
1028
1028
# Don't test the fullname,
@@ -1038,7 +1038,9 @@ def verify_typealias(
1038
1038
f"is inconsistent: runtime is an alias for { runtime_name } "
1039
1039
f"but stub is an alias for { stub_name } "
1040
1040
)
1041
- yield Error (object_path , msg , stub , runtime , stub_desc = str (stub_target ))
1041
+ yield Error (
1042
+ object_path , msg , stub , runtime , stub_desc = f"Type alias for: { stub_target } "
1043
+ )
1042
1044
return
1043
1045
if isinstance (stub_target , mypy .types .UnionType ):
1044
1046
if sys .version_info >= (3 , 10 ) and isinstance (runtime , types .UnionType ):
@@ -1051,7 +1053,7 @@ def verify_typealias(
1051
1053
if tuple not in getattr (runtime , "__mro__" , getattr (get_origin (runtime ), "__mro__" , ())):
1052
1054
yield Error (
1053
1055
object_path , "is not a subclass of tuple" , stub , runtime ,
1054
- stub_desc = str ( stub_target )
1056
+ stub_desc = f"Type alias for: { stub_target } "
1055
1057
)
1056
1058
# could check Tuple contents here...
1057
1059
return
@@ -1063,10 +1065,11 @@ def verify_typealias(
1063
1065
return
1064
1066
yield Error (
1065
1067
object_path , "is not a type alias for Callable" , stub , runtime ,
1066
- stub_desc = str ( stub_target )
1068
+ stub_desc = f"Type alias for: { stub_target } "
1067
1069
)
1068
1070
yield Error (
1069
- object_path , "is not a recognised type alias" , stub , runtime , stub_desc = str (stub_target )
1071
+ object_path , "is not a recognised type alias" , stub , runtime ,
1072
+ stub_desc = f"Type alias for: { stub_target } "
1070
1073
)
1071
1074
1072
1075
0 commit comments