@@ -200,17 +200,17 @@ def check_109(self, args: ast.arguments):
200
200
self .error (TRIO109 , arg .lineno , arg .col_offset )
201
201
202
202
def visit_While (self , node : ast .While ):
203
- self .check_for_301 (node )
203
+ self .check_for_110 (node )
204
204
self .generic_visit (node )
205
205
206
- def check_for_301 (self , node : ast .While ):
206
+ def check_for_110 (self , node : ast .While ):
207
207
if (
208
208
len (node .body ) == 1
209
209
and isinstance (node .body [0 ], ast .Expr )
210
210
and isinstance (node .body [0 ].value , ast .Await )
211
211
and get_trio_scope (node .body [0 ].value .value , "sleep" , "sleep_until" )
212
212
):
213
- self .error (TRIO301 , node .lineno , node .col_offset )
213
+ self .error (TRIO110 , node .lineno , node .col_offset )
214
214
215
215
216
216
def critical_except (node : ast .ExceptHandler ) -> Optional [Tuple [int , int , str ]]:
@@ -653,4 +653,4 @@ def run(self) -> Iterable[Error]:
653
653
TRIO107 = "TRIO107: Async functions must have at least one checkpoint on every code path, unless an exception is raised"
654
654
TRIO108 = "TRIO108: Early return from async function must have at least one checkpoint on every code path before it."
655
655
TRIO109 = "TRIO109: Async function definition with a `timeout` parameter - use `trio.[fail/move_on]_[after/at]` instead"
656
- TRIO301 = "TRIO301 : `while <condition>: await trio.sleep()` should be replaced by a `trio.Event`."
656
+ TRIO110 = "TRIO110 : `while <condition>: await trio.sleep()` should be replaced by a `trio.Event`."
0 commit comments