mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Make setting and retrieving pydocstyle settings less tedious (#12582)
This commit is contained in:
parent
138e70bd5c
commit
83b1c48a93
14 changed files with 146 additions and 134 deletions
|
@ -151,11 +151,11 @@ impl<'a> Definition<'a> {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn is_property(
|
||||
&self,
|
||||
extra_properties: &[QualifiedName],
|
||||
semantic: &SemanticModel,
|
||||
) -> bool {
|
||||
pub fn is_property<P, I>(&self, extra_properties: P, semantic: &SemanticModel) -> bool
|
||||
where
|
||||
P: IntoIterator<IntoIter = I>,
|
||||
I: Iterator<Item = QualifiedName<'a>> + Clone,
|
||||
{
|
||||
self.as_function_def()
|
||||
.is_some_and(|StmtFunctionDef { decorator_list, .. }| {
|
||||
is_property(decorator_list, extra_properties, semantic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue