72
72
K = typing .TypeVar ("K" )
73
73
T_co = typing .TypeVar ("T_co" , covariant = True )
74
74
T_gh = typing .TypeVar ("T_gh" , bound = "GithubObject" )
75
- T_gh2 = typing .TypeVar ("T_gh2" , bound = "GithubObject" )
76
75
77
76
78
77
class Attribute (Protocol [T_co ]):
@@ -371,8 +370,8 @@ def _makeClassAttribute(self, klass: type[T_gh], value: Any) -> Attribute[T_gh]:
371
370
)
372
371
373
372
def _makeUnionClassAttributeFromTypeName (
374
- self , type_name : str | None , value : Any , * class_and_names : ( type [T_gh ], str )
375
- ) -> Attribute [T_gh | T_gh2 ]:
373
+ self , type_name : str | None , value : Any , * class_and_names : tuple [ type [T_gh ], str ]
374
+ ) -> Attribute [T_gh ]:
376
375
if value is None or type_name is None :
377
376
return _ValuedAttribute (None ) # type: ignore
378
377
for klass , name in class_and_names :
@@ -385,8 +384,8 @@ def _makeUnionClassAttributeFromTypeKey(
385
384
type_key : str ,
386
385
default_type : str | None ,
387
386
value : Any ,
388
- * class_and_names : ( type [T_gh ], str ) ,
389
- ) -> Attribute [T_gh | T_gh2 ]:
387
+ * class_and_names : tuple [ type [T_gh ], str ] ,
388
+ ) -> Attribute [T_gh ]:
390
389
if value is None or not isinstance (value , dict ):
391
390
return _ValuedAttribute (None ) # type: ignore
392
391
return self ._makeUnionClassAttributeFromTypeName (value .get (type_key , default_type ), value , * class_and_names )
@@ -397,8 +396,8 @@ def _makeUnionClassAttributeFromTypeKeyAndValueKey(
397
396
value_key : str ,
398
397
default_type : str | None ,
399
398
value : Any ,
400
- * class_and_names : ( type [T_gh ], str ) ,
401
- ) -> Attribute [T_gh | T_gh2 ]:
399
+ * class_and_names : tuple [ type [T_gh ], str ] ,
400
+ ) -> Attribute [T_gh ]:
402
401
if value is None or not isinstance (value , dict ):
403
402
return _ValuedAttribute (None ) # type: ignore
404
403
return self ._makeUnionClassAttributeFromTypeName (
0 commit comments