---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLR6301 Method `developer_greeting` could be a function, class method, or static method
 --> no_self_use.py:7:9
  |
6 | class Person:
7 |     def developer_greeting(self, name):  # [no-self-use]
  |         ^^^^^^^^^^^^^^^^^^
8 |         print(f"Greetings {name}!")
  |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `greeting_1` could be a function, class method, or static method
  --> no_self_use.py:10:9
   |
 8 |         print(f"Greetings {name}!")
 9 |
10 |     def greeting_1(self):  # [no-self-use]
   |         ^^^^^^^^^^
11 |         print("Hello!")
   |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `greeting_2` could be a function, class method, or static method
  --> no_self_use.py:13:9
   |
11 |         print("Hello!")
12 |
13 |     def greeting_2(self):  # [no-self-use]
   |         ^^^^^^^^^^
14 |         print("Hi!")
   |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `validate_y` could be a function, class method, or static method
   --> no_self_use.py:103:9
    |
102 |     @y.validator
103 |     def validate_y(self, attribute, value):
    |         ^^^^^^^^^^
104 |         if value <= 0:
105 |             raise ValueError("y must be a positive integer")
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `non_simple_assignment` could be a function, class method, or static method
   --> no_self_use.py:128:9
    |
126 |     # Errors
127 |
128 |     def non_simple_assignment(self):
    |         ^^^^^^^^^^^^^^^^^^^^^
129 |         msg = foo = ""
130 |         raise NotImplementedError(msg)
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `non_simple_assignment_2` could be a function, class method, or static method
   --> no_self_use.py:132:9
    |
130 |         raise NotImplementedError(msg)
131 |
132 |     def non_simple_assignment_2(self):
    |         ^^^^^^^^^^^^^^^^^^^^^^^
133 |         msg[0] = ""
134 |         raise NotImplementedError(msg)
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `unused_message` could be a function, class method, or static method
   --> no_self_use.py:136:9
    |
134 |         raise NotImplementedError(msg)
135 |
136 |     def unused_message(self):
    |         ^^^^^^^^^^^^^^
137 |         msg = ""
138 |         raise NotImplementedError("")
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `unused_message_2` could be a function, class method, or static method
   --> no_self_use.py:140:9
    |
138 |         raise NotImplementedError("")
139 |
140 |     def unused_message_2(self, x):
    |         ^^^^^^^^^^^^^^^^
141 |         msg = ""
142 |         raise NotImplementedError(x)
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `developer_greeting` could be a function, class method, or static method
   --> no_self_use.py:145:9
    |
144 | class TPerson:
145 |     def developer_greeting(self, name):  # [no-self-use]
    |         ^^^^^^^^^^^^^^^^^^
146 |         print(t"Greetings {name}!")
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass

PLR6301 Method `tstring` could be a function, class method, or static method
   --> no_self_use.py:151:9
    |
149 |         print(t"Hello from {self.name} !")
150 |
151 |     def tstring(self, x):
    |         ^^^^^^^
152 |         msg = t"{x}"
153 |         raise NotImplementedError(msg)
    |
help: Consider adding `@typing.override` if this method overrides a method from a superclass
