File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ def visit_match_case(self, node: Node) -> Iterator[Line]:
281
281
282
282
def visit_suite (self , node : Node ) -> Iterator [Line ]:
283
283
"""Visit a suite."""
284
- if self . mode . is_pyi and is_stub_suite (node ):
284
+ if is_stub_suite (node ):
285
285
yield from self .visit (node .children [2 ])
286
286
else :
287
287
yield from self .visit_default (node )
@@ -296,19 +296,15 @@ def visit_simple_stmt(self, node: Node) -> Iterator[Line]:
296
296
297
297
is_suite_like = node .parent and node .parent .type in STATEMENT
298
298
if is_suite_like :
299
- if self . mode . is_pyi and is_stub_body (node ):
299
+ if is_stub_body (node ):
300
300
yield from self .visit_default (node )
301
301
else :
302
302
yield from self .line (+ 1 )
303
303
yield from self .visit_default (node )
304
304
yield from self .line (- 1 )
305
305
306
306
else :
307
- if (
308
- not self .mode .is_pyi
309
- or not node .parent
310
- or not is_stub_suite (node .parent )
311
- ):
307
+ if not node .parent or not is_stub_suite (node .parent ):
312
308
yield from self .line ()
313
309
yield from self .visit_default (node )
314
310
You can’t perform that action at this time.
0 commit comments