Fix match_like_matches_macro in src/pylint/plugins.rs (#1007)

This commit is contained in:
Harutaka Kawamura
2022-12-03 14:21:32 +09:00
committed by GitHub
parent 115e85b47d
commit 3efa1a03f2

View File

@@ -12,10 +12,10 @@ pub fn property_with_parameters(
decorator_list: &[Expr],
args: &Arguments,
) {
if decorator_list.iter().any(|d| match &d.node {
ExprKind::Name { id, .. } if id == "property" => true,
_ => false,
}) {
if decorator_list
.iter()
.any(|d| matches!(&d.node, ExprKind::Name { id, .. } if id == "property"))
{
if checker.is_builtin("property")
&& args
.args