mirror of https://github.com/astral-sh/ruff
use is_empty
Signed-off-by: harupy <hkawamura0130@gmail.com>
This commit is contained in:
parent
ad15814811
commit
ea801225fc
|
|
@ -242,7 +242,7 @@ impl Visitor for Checker<'_> {
|
|||
StmtKind::If { test, .. } => {
|
||||
if self.settings.select.contains(CheckKind::IfTuple.code()) {
|
||||
if let ExprKind::Tuple { elts, .. } = &test.node {
|
||||
if elts.len() > 0 {
|
||||
if !elts.is_empty() {
|
||||
self.checks.push(Check {
|
||||
kind: CheckKind::IfTuple,
|
||||
location: stmt.location,
|
||||
|
|
|
|||
Loading…
Reference in New Issue