---
source: crates/ruff_linter/src/rules/flake8_unused_arguments/mod.rs
---
ARG002 Unused method argument: `x`
  --> ARG.py:37:17
   |
35 |     # Unused arguments.
36 |     ###
37 |     def f(self, x):
   |                 ^
38 |         print("Hello, world!")
   |

ARG002 Unused method argument: `x`
  --> ARG.py:40:20
   |
38 |         print("Hello, world!")
39 |
40 |     def f(self, /, x):
   |                    ^
41 |         print("Hello, world!")
   |

ARG002 Unused method argument: `x`
  --> ARG.py:43:16
   |
41 |         print("Hello, world!")
42 |
43 |     def f(cls, x):
   |                ^
44 |         print("Hello, world!")
   |

ARG002 Unused method argument: `x`
  --> ARG.py:58:17
   |
56 |         print("Hello, world!")
57 |
58 |     def f(self, x):
   |                 ^
59 |         msg[0] = "..."
60 |         raise NotImplementedError(msg)
   |

ARG002 Unused method argument: `x`
  --> ARG.py:62:17
   |
60 |         raise NotImplementedError(msg)
61 |
62 |     def f(self, x):
   |                 ^
63 |         msg = "..."
64 |         raise NotImplementedError(foo)
   |

ARG002 Unused method argument: `x`
  --> ARG.py:66:17
   |
64 |         raise NotImplementedError(foo)
65 |
66 |     def f(self, x):
   |                 ^
67 |         msg = "..."
68 |         raise NotImplementedError("must use msg")
   |

ARG002 Unused method argument: `x`
   --> ARG.py:216:24
    |
214 |         print("Hello, world!")
215 |
216 |     def __init__(self, x) -> None:
    |                        ^
217 |         print("Hello, world!")
    |

ARG002 Unused method argument: `y`
   --> ARG.py:255:20
    |
253 | ###
254 | class C:
255 |     def f(self, x, y):
    |                    ^
256 |         """Docstring."""
257 |         msg = t"{x}..."
    |
