---
source: crates/ruff_linter/src/rules/pep8_naming/mod.rs
---
N805.py:10:18: N805 [*] First argument of a method should be named `self`
   |
 8 |         pass
 9 | 
10 |     def stillBad(this):
   |                  ^^^^ N805
11 |         pass
   |
   = help: Rename `this` to `self`

ℹ Unsafe fix
7  7  |     def badAllowed(this):
8  8  |         pass
9  9  | 
10    |-    def stillBad(this):
   10 |+    def stillBad(self):
11 11 |         pass
12 12 | 
13 13 |     if False:

N805.py:18:22: N805 [*] First argument of a method should be named `self`
   |
16 |             pass
17 | 
18 |         def stillBad(this):
   |                      ^^^^ N805
19 |             pass
   |
   = help: Rename `this` to `self`

ℹ Unsafe fix
15 15 |         def badAllowed(this):
16 16 |             pass
17 17 | 
18    |-        def stillBad(this):
   18 |+        def stillBad(self):
19 19 |             pass
20 20 | 
21 21 |     @pydantic.validator

N805.py:26:18: N805 [*] First argument of a method should be named `self`
   |
25 |     @pydantic.validator
26 |     def stillBad(cls, my_field: str) -> str:
   |                  ^^^ N805
27 |         pass
   |
   = help: Rename `cls` to `self`

ℹ Unsafe fix
23 23 |         pass
24 24 | 
25 25 |     @pydantic.validator
26    |-    def stillBad(cls, my_field: str) -> str:
   26 |+    def stillBad(self, my_field: str) -> str:
27 27 |         pass
28 28 | 
29 29 |     @pydantic.validator("my_field")

N805.py:34:18: N805 [*] First argument of a method should be named `self`
   |
33 |     @pydantic.validator("my_field")
34 |     def stillBad(cls, my_field: str) -> str:
   |                  ^^^ N805
35 |         pass
   |
   = help: Rename `cls` to `self`

ℹ Unsafe fix
31 31 |         pass
32 32 | 
33 33 |     @pydantic.validator("my_field")
34    |-    def stillBad(cls, my_field: str) -> str:
   34 |+    def stillBad(self, my_field: str) -> str:
35 35 |         pass
36 36 | 
37 37 |     @classmethod

N805.py:58:18: N805 First argument of a method should be named `self`
   |
56 |         pass
57 | 
58 |     def stillBad(this, blah, /, self, something: str):
   |                  ^^^^ N805
59 |         pass
   |
   = help: Rename `this` to `self`
