---
source: crates/ruff_linter/src/linter.rs
---
resources/test/fixtures/syntax_errors/return_outside_function.py:13:1: F706 `return` statement outside of a function/method
   |
13 | return 1  # error
   | ^^^^^^^^ F706
14 | return  # error
   |

resources/test/fixtures/syntax_errors/return_outside_function.py:14:1: F706 `return` statement outside of a function/method
   |
13 | return 1  # error
14 | return  # error
   | ^^^^^^ F706
   |

resources/test/fixtures/syntax_errors/return_outside_function.py:18:5: F706 `return` statement outside of a function/method
   |
17 | class C:
18 |     return 1  # error
   |     ^^^^^^^^ F706
   |

resources/test/fixtures/syntax_errors/return_outside_function.py:23:9: F706 `return` statement outside of a function/method
   |
21 | def f():
22 |     class C:
23 |         return 1  # error
   |         ^^^^^^^^ F706
   |
