1
- # ruff: noqa: F821
2
1
3
2
import pytest
4
3
@@ -13,14 +12,14 @@ def test_get_specialized_type_var_map_non_generic(value: type):
13
12
14
13
def test_get_specialized_type_var_map_generic_not_specialized ():
15
14
@strawberry .type
16
- class Foo [_T ]: ...
15
+ class Foo [T ]: ...
17
16
18
17
assert get_specialized_type_var_map (Foo ) == {}
19
18
20
19
21
20
def test_get_specialized_type_var_map_generic ():
22
21
@strawberry .type
23
- class Foo [_T ]: ...
22
+ class Foo [T ]: ...
24
23
25
24
@strawberry .type
26
25
class Bar (Foo [int ]): ...
@@ -30,7 +29,7 @@ class Bar(Foo[int]): ...
30
29
31
30
def test_get_specialized_type_var_map_from_alias ():
32
31
@strawberry .type
33
- class Foo [_T ]: ...
32
+ class Foo [T ]: ...
34
33
35
34
SpecializedFoo = Foo [int ]
36
35
@@ -39,7 +38,7 @@ class Foo[_T]: ...
39
38
40
39
def test_get_specialized_type_var_map_from_alias_with_inheritance ():
41
40
@strawberry .type
42
- class Foo [_T ]: ...
41
+ class Foo [T ]: ...
43
42
44
43
SpecializedFoo = Foo [int ]
45
44
@@ -51,7 +50,7 @@ class Bar(SpecializedFoo): ...
51
50
52
51
def test_get_specialized_type_var_map_generic_subclass ():
53
52
@strawberry .type
54
- class Foo [_T ]: ...
53
+ class Foo [T ]: ...
55
54
56
55
@strawberry .type
57
56
class Bar (Foo [int ]): ...
@@ -64,10 +63,10 @@ class BarSubclass(Bar): ...
64
63
65
64
def test_get_specialized_type_var_map_double_generic ():
66
65
@strawberry .type
67
- class Foo [_T ]: ...
66
+ class Foo [T ]: ...
68
67
69
68
@strawberry .type
70
- class Bar [_T ](Foo [_T ]): ...
69
+ class Bar [T ](Foo [T ]): ...
71
70
72
71
@strawberry .type
73
72
class Bin (Bar [int ]): ...
@@ -77,10 +76,10 @@ class Bin(Bar[int]): ...
77
76
78
77
def test_get_specialized_type_var_map_double_generic_subclass ():
79
78
@strawberry .type
80
- class Foo [_T ]: ...
79
+ class Foo [T ]: ...
81
80
82
81
@strawberry .type
83
- class Bar [_T ](Foo [_T ]): ...
82
+ class Bar [T ](Foo [T ]): ...
84
83
85
84
@strawberry .type
86
85
class Bin (Bar [int ]): ...
@@ -93,10 +92,10 @@ class BinSubclass(Bin): ...
93
92
94
93
def test_get_specialized_type_var_map_double_generic_passthrough ():
95
94
@strawberry .type
96
- class Foo [_T ]: ...
95
+ class Foo [T ]: ...
97
96
98
97
@strawberry .type
99
- class Bar [_K ](Foo [_K ]): ...
98
+ class Bar [K ](Foo [K ]): ...
100
99
101
100
@strawberry .type
102
101
class Bin (Bar [int ]): ...
@@ -109,10 +108,10 @@ class Bin(Bar[int]): ...
109
108
110
109
def test_get_specialized_type_var_map_multiple_inheritance ():
111
110
@strawberry .type
112
- class Foo [_T ]: ...
111
+ class Foo [T ]: ...
113
112
114
113
@strawberry .type
115
- class Bar [_K ]: ...
114
+ class Bar [K ]: ...
116
115
117
116
@strawberry .type
118
117
class Bin (Foo [int ]): ...
@@ -128,10 +127,10 @@ class Baz(Bin, Bar[str]): ...
128
127
129
128
def test_get_specialized_type_var_map_multiple_inheritance_subclass ():
130
129
@strawberry .type
131
- class Foo [_T ]: ...
130
+ class Foo [T ]: ...
132
131
133
132
@strawberry .type
134
- class Bar [_K ]: ...
133
+ class Bar [K ]: ...
135
134
136
135
@strawberry .type
137
136
class Bin (Foo [int ]): ...
0 commit comments