---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
singledispatchmethod_function.py:4:1: PLE1520 [*] `@singledispatchmethod` decorator should not be used on non-method functions
  |
4 | @singledispatchmethod  # [singledispatchmethod-function]
  | ^^^^^^^^^^^^^^^^^^^^^ PLE1520
5 | def convert_position(position):
6 |     pass
  |
  = help: Replace with `@singledispatch`

ℹ Unsafe fix
1   |-from functools import singledispatchmethod
  1 |+from functools import singledispatchmethod, singledispatch
2 2 | 
3 3 | 
4   |-@singledispatchmethod  # [singledispatchmethod-function]
  4 |+@singledispatch  # [singledispatchmethod-function]
5 5 | def convert_position(position):
6 6 |     pass
7 7 |
