From 74b00c9b91f8d14fa774ec6c076a674d236b5c5f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 9 Oct 2023 15:11:45 -0400 Subject: [PATCH] Fix commented-out `coalesce` keyword (#7876) See: https://github.com/astral-sh/ruff/pull/7874#issuecomment-1753498994. --- .../ruff_linter/src/rules/flake8_boolean_trap/helpers.rs | 2 +- ..._rules__flake8_boolean_trap__tests__FBT003_FBT.py.snap | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs b/crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs index 58764a783a..038ab49c12 100644 --- a/crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs +++ b/crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs @@ -12,7 +12,7 @@ pub(super) fn is_allowed_func_call(name: &str) -> bool { | "assertNotEquals" | "bool" | "bytes" - // | "coalesce" + | "coalesce" | "count" | "failIfEqual" | "failUnlessEqual" diff --git a/crates/ruff_linter/src/rules/flake8_boolean_trap/snapshots/ruff_linter__rules__flake8_boolean_trap__tests__FBT003_FBT.py.snap b/crates/ruff_linter/src/rules/flake8_boolean_trap/snapshots/ruff_linter__rules__flake8_boolean_trap__tests__FBT003_FBT.py.snap index 3e59e30e7d..d2b9021145 100644 --- a/crates/ruff_linter/src/rules/flake8_boolean_trap/snapshots/ruff_linter__rules__flake8_boolean_trap__tests__FBT003_FBT.py.snap +++ b/crates/ruff_linter/src/rules/flake8_boolean_trap/snapshots/ruff_linter__rules__flake8_boolean_trap__tests__FBT003_FBT.py.snap @@ -38,12 +38,4 @@ FBT.py:69:38: FBT003 Boolean positional value in function call 71 | bar.is_not(False) | -FBT.py:73:31: FBT003 Boolean positional value in function call - | -71 | bar.is_not(False) -72 | next(iter([]), False) -73 | sa.func.coalesce(tbl.c.valid, False) - | ^^^^^ FBT003 - | -