---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF074 `@abstractmethod` should be placed after `@property`
  --> RUF074.py:14:5
   |
13 | class AbstractAboveProperty:
14 |     @abstractmethod  # RUF074
   |     ^^^^^^^^^^^^^^^
15 |     @property
16 |     def foo(self): ...
   |

RUF074 `@abstractmethod` should be placed after `@classmethod`
  --> RUF074.py:19:5
   |
18 | class AbstractAboveClassmethod:
19 |     @abstractmethod  # RUF074
   |     ^^^^^^^^^^^^^^^
20 |     @classmethod
21 |     def foo(cls): ...
   |

RUF074 `@abstractmethod` should be placed after `@staticmethod`
  --> RUF074.py:24:5
   |
23 | class AbstractAboveStaticmethod:
24 |     @abstractmethod  # RUF074
   |     ^^^^^^^^^^^^^^^
25 |     @staticmethod
26 |     def foo(): ...
   |

RUF074 `@contextmanager` should be placed after `@classmethod`
  --> RUF074.py:31:5
   |
30 | class ContextManagerAboveClassmethod:
31 |     @contextmanager  # RUF074
   |     ^^^^^^^^^^^^^^^
32 |     @classmethod
33 |     def foo(cls): ...
   |

RUF074 `@asynccontextmanager` should be placed after `@classmethod`
  --> RUF074.py:36:5
   |
35 | class AsyncContextManagerAboveClassmethod:
36 |     @asynccontextmanager  # RUF074
   |     ^^^^^^^^^^^^^^^^^^^^
37 |     @classmethod
38 |     def foo(cls): ...
   |

RUF074 `@functools.cache` should be placed after `@property`
  --> RUF074.py:43:5
   |
42 | class CacheAboveProperty:
43 |     @cache  # RUF074
   |     ^^^^^^
44 |     @property
45 |     def foo(self): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@property`
  --> RUF074.py:48:5
   |
47 | class LruCacheAboveProperty:
48 |     @lru_cache  # RUF074
   |     ^^^^^^^^^^
49 |     @property
50 |     def foo(self): ...
   |

RUF074 `@functools.cache` should be placed after `@classmethod`
  --> RUF074.py:53:5
   |
52 | class CacheAboveClassmethod:
53 |     @cache  # RUF074
   |     ^^^^^^
54 |     @classmethod
55 |     def foo(cls): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@classmethod`
  --> RUF074.py:58:5
   |
57 | class LruCacheAboveClassmethod:
58 |     @lru_cache  # RUF074
   |     ^^^^^^^^^^
59 |     @classmethod
60 |     def foo(cls): ...
   |

RUF074 `@functools.cache` should be placed after `@functools.cached_property`
  --> RUF074.py:63:5
   |
62 | class CacheAboveCachedProperty:
63 |     @cache  # RUF074
   |     ^^^^^^
64 |     @cached_property
65 |     def foo(self): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@functools.cached_property`
  --> RUF074.py:68:5
   |
67 | class LruCacheAboveCachedProperty:
68 |     @lru_cache  # RUF074
   |     ^^^^^^^^^^
69 |     @cached_property
70 |     def foo(self): ...
   |

RUF074 `@abstractmethod` should be placed after `@property`
  --> RUF074.py:75:5
   |
74 | class QualifiedAbstractAboveProperty:
75 |     @abc.abstractmethod  # RUF074
   |     ^^^^^^^^^^^^^^^^^^^
76 |     @property
77 |     def foo(self): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@property`
  --> RUF074.py:80:5
   |
79 | class QualifiedLruCacheAboveProperty:
80 |     @functools.lru_cache  # RUF074
   |     ^^^^^^^^^^^^^^^^^^^^
81 |     @property
82 |     def foo(self): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@property`
  --> RUF074.py:87:5
   |
86 | class LruCacheCallAboveProperty:
87 |     @lru_cache()  # RUF074
   |     ^^^^^^^^^^^^
88 |     @property
89 |     def foo(self): ...
   |

RUF074 `@functools.lru_cache` should be placed after `@property`
  --> RUF074.py:92:5
   |
91 | class LruCacheCallWithArgsAboveProperty:
92 |     @lru_cache(maxsize=128)  # RUF074
   |     ^^^^^^^^^^^^^^^^^^^^^^^
93 |     @property
94 |     def foo(self): ...
   |

RUF074 `@abstractmethod` should be placed after `@property`
   --> RUF074.py:99:5
    |
 98 | class MultipleViolations:
 99 |     @abstractmethod  # RUF074
    |     ^^^^^^^^^^^^^^^
100 |     @property
101 |     @contextmanager  # RUF074
    |

RUF074 `@contextmanager` should be placed after `@classmethod`
   --> RUF074.py:101:5
    |
 99 |     @abstractmethod  # RUF074
100 |     @property
101 |     @contextmanager  # RUF074
    |     ^^^^^^^^^^^^^^^
102 |     @classmethod
103 |     def foo(cls): ...
    |

RUF074 `@functools.cached_property` should be placed after `@abstractmethod`
   --> RUF074.py:106:5
    |
105 | class CachedPropertyAboveAbstractmethod:
106 |     @cached_property  # RUF074
    |     ^^^^^^^^^^^^^^^^
107 |     @abstractmethod
108 |     def foo(self): ...
    |

RUF074 `@abstractmethod` should be placed after `@property`
   --> RUF074.py:115:5
    |
113 |     def foo(self): ...
114 |
115 |     @abstractmethod  # RUF074
    |     ^^^^^^^^^^^^^^^
116 |     @foo.setter
117 |     def foo(self, val): ...
    |

RUF074 `@abstractmethod` should be placed after `@property`
   --> RUF074.py:124:5
    |
122 |     def foo(self): ...
123 |
124 |     @abstractmethod  # RUF074
    |     ^^^^^^^^^^^^^^^
125 |     @foo.deleter
126 |     def foo(self): ...
    |
