1111 GetQuals ,
1212 GetType ,
1313 InitField ,
14- Sub ,
14+ IsSub ,
1515 Iter ,
1616 Member ,
1717 Members ,
@@ -80,7 +80,7 @@ class Final(Mine, Ordinary, Wrapper[float], AnotherBase[float], Last[int]):
8080 pass
8181
8282
83- type BaseArg [T ] = GetArg [T , Base , 0 ] if Sub [T , Base ] else Never
83+ type BaseArg [T ] = GetArg [T , Base , 0 ] if IsSub [T , Base ] else Never
8484
8585
8686type AllOptional [T ] = NewProtocol [
@@ -101,7 +101,7 @@ class Final(Mine, Ordinary, Wrapper[float], AnotherBase[float], Last[int]):
101101]
102102
103103type Prims [T ] = NewProtocol [
104- * [p for p in Iter [Attrs [T ]] if Sub [GetType [p ], int | str ]]
104+ * [p for p in Iter [Attrs [T ]] if IsSub [GetType [p ], int | str ]]
105105]
106106
107107type NoLiterals1 [T ] = NewProtocol [
@@ -114,7 +114,7 @@ class Final(Mine, Ordinary, Wrapper[float], AnotherBase[float], Last[int]):
114114 for t in Iter [FromUnion [GetType [p ]]]
115115 # XXX: 'typing.Literal' is not *really* a type...
116116 # Maybe we can't do this, which maybe is fine.
117- if not Sub [t , Literal ]
117+ if not IsSub [t , Literal ]
118118 ]
119119 ],
120120 GetQuals [p ],
@@ -130,10 +130,10 @@ class Final(Mine, Ordinary, Wrapper[float], AnotherBase[float], Last[int]):
130130type IsLiteral [T ] = (
131131 Literal [True ]
132132 if (
133- (Sub [T , str ] and not Sub [str , T ])
134- or (Sub [T , bytes ] and not Sub [bytes , T ])
135- or (Sub [T , bool ] and not Sub [bool , T ])
136- or (Sub [T , int ] and not Sub [int , T ])
133+ (IsSub [T , str ] and not IsSub [str , T ])
134+ or (IsSub [T , bytes ] and not IsSub [bytes , T ])
135+ or (IsSub [T , bool ] and not IsSub [bool , T ])
136+ or (IsSub [T , int ] and not IsSub [int , T ])
137137 # XXX: enum, None
138138 )
139139 else Literal [False ]
@@ -150,7 +150,7 @@ class Final(Mine, Ordinary, Wrapper[float], AnotherBase[float], Last[int]):
150150 # XXX: 'typing.Literal' is not *really* a type...
151151 # Maybe we can't do this, which maybe is fine.
152152 # if not IsSubtype[t, Literal]
153- if not Sub [IsLiteral [t ], Literal [True ]]
153+ if not IsSub [IsLiteral [t ], Literal [True ]]
154154 ]
155155 ],
156156 GetQuals [p ],
0 commit comments