mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:17 +00:00
Consider more stdlib decorators to be property-like (#12583)
This commit is contained in:
parent
4738135801
commit
90db361199
4 changed files with 70 additions and 1 deletions
|
@ -74,7 +74,10 @@ pub fn is_property(
|
|||
.is_some_and(|qualified_name| {
|
||||
matches!(
|
||||
qualified_name.segments(),
|
||||
["" | "builtins", "property"] | ["functools", "cached_property"]
|
||||
["" | "builtins" | "enum", "property"]
|
||||
| ["functools", "cached_property"]
|
||||
| ["abc", "abstractproperty"]
|
||||
| ["types", "DynamicClassAttribute"]
|
||||
) || extra_properties
|
||||
.iter()
|
||||
.any(|extra_property| extra_property.segments() == qualified_name.segments())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue