File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -139,19 +139,10 @@ pub fn is_unionable(obj: PyObjectRef, vm: &VirtualMachine) -> bool {
139139 || obj. class ( ) . is ( vm. ctx . types . union_type )
140140}
141141
142- fn is_typevar ( obj : & PyObjectRef , vm : & VirtualMachine ) -> bool {
143- let class = obj. class ( ) ;
144- "TypeVar" == & * class. slot_name ( )
145- && class
146- . get_attr ( identifier ! ( vm, __module__) )
147- . and_then ( |o| o. downcast_ref :: < PyStr > ( ) . map ( |s| s. as_str ( ) == "typing" ) )
148- . unwrap_or ( false )
149- }
150-
151142fn make_parameters ( args : & PyTupleRef , vm : & VirtualMachine ) -> PyTupleRef {
152143 let mut parameters: Vec < PyObjectRef > = Vec :: with_capacity ( args. len ( ) ) ;
153144 for arg in args {
154- if is_typevar ( arg, vm) {
145+ if genericalias :: is_typevar ( arg, vm) {
155146 if !parameters. iter ( ) . any ( |param| param. is ( arg) ) {
156147 parameters. push ( arg. clone ( ) ) ;
157148 }
You can’t perform that action at this time.
0 commit comments