---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI010.pyi:6:5: PYI010 [*] Function body must contain only `...`
  |
5 | def buzz():
6 |     print("buzz")  # ERROR PYI010
  |     ^^^^^^^^^^^^^ PYI010
7 | 
8 | def foo2():
  |
  = help: Replace function body with `...`

ℹ Safe fix
3 3 |     """foo"""  # OK, docstrings are handled by another rule
4 4 | 
5 5 | def buzz():
6   |-    print("buzz")  # ERROR PYI010
  6 |+    ...  # ERROR PYI010
7 7 | 
8 8 | def foo2():
9 9 |     123  # ERROR PYI010

PYI010.pyi:9:5: PYI010 [*] Function body must contain only `...`
   |
 8 | def foo2():
 9 |     123  # ERROR PYI010
   |     ^^^ PYI010
10 | 
11 | def bizz():
   |
   = help: Replace function body with `...`

ℹ Safe fix
6  6  |     print("buzz")  # ERROR PYI010
7  7  | 
8  8  | def foo2():
9     |-    123  # ERROR PYI010
   9  |+    ...  # ERROR PYI010
10 10 | 
11 11 | def bizz():
12 12 |     x = 123  # ERROR PYI010

PYI010.pyi:12:5: PYI010 [*] Function body must contain only `...`
   |
11 | def bizz():
12 |     x = 123  # ERROR PYI010
   |     ^^^^^^^ PYI010
13 | 
14 | def foo3():
   |
   = help: Replace function body with `...`

ℹ Safe fix
9  9  |     123  # ERROR PYI010
10 10 | 
11 11 | def bizz():
12    |-    x = 123  # ERROR PYI010
   12 |+    ...  # ERROR PYI010
13 13 | 
14 14 | def foo3():
15 15 |     pass  # OK, pass is handled by another rule


