@@ -97,8 +97,7 @@ def unicode_escape_replace(matchobj: re.Match[str]) -> str:
9797
9898
9999class T_TokenSlice (Protocol ):
100- def __getitem__ (self , item : int ) -> JSON5Token :
101- ...
100+ def __getitem__ (self , item : int ) -> JSON5Token : ...
102101
103102
104103class T_AnyProduction (Protocol ):
@@ -110,8 +109,7 @@ class T_TextProduction(Protocol):
110109 wsc1 : list [Comment | str ]
111110 value : Value
112111
113- def __getitem__ (self , i : Literal [1 ]) -> Value :
114- ...
112+ def __getitem__ (self , i : Literal [1 ]) -> Value : ...
115113
116114
117115class T_FirstKeyValuePairProduction (Protocol ):
@@ -122,22 +120,19 @@ class T_FirstKeyValuePairProduction(Protocol):
122120 value : Value
123121 _slice : T_TokenSlice
124122
125- def __getitem__ (self , item : int ) -> Key | Value :
126- ...
123+ def __getitem__ (self , item : int ) -> Key | Value : ...
127124
128125
129126class T_WSCProduction (Protocol ):
130127 _slice : T_TokenSlice
131128
132- def __getitem__ (self , item : Literal [0 ]) -> str | Comment :
133- ...
129+ def __getitem__ (self , item : Literal [0 ]) -> str | Comment : ...
134130
135131
136132class T_CommentProduction (Protocol ):
137133 _slice : T_TokenSlice
138134
139- def __getitem__ (self , item : Literal [0 ]) -> str :
140- ...
135+ def __getitem__ (self , item : Literal [0 ]) -> str : ...
141136
142137
143138class T_KeyValuePairsProduction (Protocol ):
@@ -161,8 +156,7 @@ class SubsequentKeyValuePairProduction(Protocol):
161156class T_FirstArrayValueProduction (Protocol ):
162157 _slice : T_TokenSlice
163158
164- def __getitem__ (self , item : Literal [1 ]) -> Value :
165- ...
159+ def __getitem__ (self , item : Literal [1 ]) -> Value : ...
166160
167161 wsc : list [Comment | str ]
168162
@@ -188,20 +182,17 @@ class T_JsonArrayProduction(Protocol):
188182class T_IdentifierProduction (Protocol ):
189183 _slice : T_TokenSlice
190184
191- def __getitem__ (self , item : Literal [0 ]) -> str :
192- ...
185+ def __getitem__ (self , item : Literal [0 ]) -> str : ...
193186
194187
195188class T_KeyProduction (Protocol ):
196- def __getitem__ (self , item : Literal [1 ]) -> Identifier | DoubleQuotedString | SingleQuotedString :
197- ...
189+ def __getitem__ (self , item : Literal [1 ]) -> Identifier | DoubleQuotedString | SingleQuotedString : ...
198190
199191
200192class T_NumberProduction (Protocol ):
201193 _slice : T_TokenSlice
202194
203- def __getitem__ (self , item : Literal [0 ]) -> str :
204- ...
195+ def __getitem__ (self , item : Literal [0 ]) -> str : ...
205196
206197
207198class T_ValueNumberProduction (Protocol ):
@@ -212,22 +203,19 @@ class T_ValueNumberProduction(Protocol):
212203class T_ExponentNotationProduction (Protocol ):
213204 _slice : T_TokenSlice
214205
215- def __getitem__ (self , item : int ) -> str :
216- ...
206+ def __getitem__ (self , item : int ) -> str : ...
217207
218208
219209class T_StringTokenProduction (Protocol ):
220210 _slice : T_TokenSlice
221211
222- def __getitem__ (self , item : Literal [0 ]) -> str :
223- ...
212+ def __getitem__ (self , item : Literal [0 ]) -> str : ...
224213
225214
226215class T_StringProduction (Protocol ):
227216 _slice : T_TokenSlice
228217
229- def __getitem__ (self , item : Literal [0 ]) -> DoubleQuotedString | SingleQuotedString :
230- ...
218+ def __getitem__ (self , item : Literal [0 ]) -> DoubleQuotedString | SingleQuotedString : ...
231219
232220
233221class T_ValueProduction (Protocol ):
@@ -246,8 +234,7 @@ def __getitem__(
246234 | Integer
247235 | Float
248236 | NaN
249- ):
250- ...
237+ ): ...
251238
252239
253240T_CallArg = typing .TypeVar ('T_CallArg' )
@@ -642,7 +629,7 @@ class tok:
642629 self .errors .append (JSON5DecodeError ('Expecting value. Received unexpected EOF' , None ))
643630 return None
644631
645- def _token_gen (self , tokens : typing .Iterable [JSON5Token ]) -> typing .Generator [JSON5Token , None , None ]:
632+ def _token_gen (self , tokens : typing .Iterable [JSON5Token ]) -> typing .Generator [JSON5Token ]:
646633 for tok in tokens :
647634 self .last_token = tok
648635 self .seen_tokens .append (tok )
0 commit comments