Skip to content

Commit 4fede05

Browse files
timsaucerclaude
andcommitted
chore: suppress FBT003 in tests and remove redundant noqa comments
Add FBT003 (boolean positional value) to the per-file-ignores for python/tests/* in pyproject.toml, and remove the 6 now-redundant inline noqa: FBT003 comments across test_expr.py and test_context.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6bed11 commit 4fede05

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ extend-allowed-calls = ["datafusion.lit", "lit"]
111111
"ARG",
112112
"BLE001",
113113
"D",
114+
"FBT003",
114115
"PD",
115116
"PLC0415",
116117
"PLR0913",

python/tests/test_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,12 +964,12 @@ def test_csv_read_options_builder_pattern():
964964

965965
options = (
966966
CsvReadOptions()
967-
.with_has_header(False) # noqa: FBT003
967+
.with_has_header(False)
968968
.with_delimiter("|")
969969
.with_quote("'")
970970
.with_schema_infer_max_records(2000)
971-
.with_truncated_rows(True) # noqa: FBT003
972-
.with_newlines_in_values(True) # noqa: FBT003
971+
.with_truncated_rows(True)
972+
.with_newlines_in_values(True)
973973
.with_file_extension(".tsv")
974974
)
975975
assert options.has_header is False

python/tests/test_expr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ def test_coerce_to_expr_wraps_float():
10511051

10521052

10531053
def test_coerce_to_expr_wraps_bool():
1054-
result = coerce_to_expr(True) # noqa: FBT003
1054+
result = coerce_to_expr(True)
10551055
assert isinstance(result, type(lit(True)))
10561056

10571057

@@ -1075,8 +1075,8 @@ def test_coerce_to_expr_or_none_passes_expr_through():
10751075
"value",
10761076
[
10771077
# Boolean
1078-
pa.scalar(True, type=pa.bool_()), # noqa: FBT003
1079-
pa.scalar(False, type=pa.bool_()), # noqa: FBT003
1078+
pa.scalar(True, type=pa.bool_()),
1079+
pa.scalar(False, type=pa.bool_()),
10801080
# Integers - signed
10811081
pa.scalar(127, type=pa.int8()),
10821082
pa.scalar(-128, type=pa.int8()),

0 commit comments

Comments
 (0)