Skip to content

Commit 8e63fdb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent dec2024 commit 8e63fdb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pylint/checkers/refactoring/implicit_booleaness_checker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ def _check_compare_to_str_or_zero(self, node: nodes.Compare) -> None:
216216
elif _is_constant_zero(right_operand):
217217
operand = left_operand
218218
if operand is not None:
219-
original = f"{left_operand.as_string()} {operator} {right_operand.as_string()}"
219+
original = (
220+
f"{left_operand.as_string()} {operator} {right_operand.as_string()}"
221+
)
220222
suggestion = (
221223
operand.as_string()
222224
if operator in {"!=", "is not"}
@@ -284,9 +286,7 @@ def _check_use_implicit_booleaness_not_comparison(
284286

285287
# Only time we bypass check is when target_node is not inherited by
286288
# collection literals and have its own __bool__ implementation.
287-
if not is_base_comprehension_type and self.instance_has_bool(
288-
target_instance
289-
):
289+
if not is_base_comprehension_type and self.instance_has_bool(target_instance):
290290
return
291291

292292
# No need to check for operator when visiting compare node

0 commit comments

Comments
 (0)