Skip to content

Commit f048027

Browse files
committed
Restore dropped comments
1 parent 205ec3e commit f048027

1 file changed

Lines changed: 37 additions & 27 deletions

File tree

sdks/python/pyproject.toml

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -137,36 +137,41 @@ src = ["apache_beam"]
137137
[tool.ruff.lint]
138138
select = ["E9", "PL", "F821", "F822", "F823"]
139139
ignore = [
140-
"PLC0415",
141-
"PLR2004",
142-
"PLR0913",
143-
"PLR0912",
144-
"PLW0108",
145-
"PLW2901",
146-
"PLR0915",
147-
"PLR1714",
148-
"PLR0911",
149-
"PLR5501",
150-
"PLW0603",
151-
"PLR1730",
152-
"PLW1641",
153-
"PLW0602",
154-
"PLC1802",
155-
"PLC3002",
156-
"PLW0642",
157-
"PLR1733",
158-
"PLR0402",
159-
"PLC0132",
160-
"PLC0206",
161-
"PLC0207",
162-
"PLR1704",
163-
"PLR1711",
164-
"PLW0406",
165-
"PLW3301",
166-
"PLR2044",
140+
# Ignored Pylint Checks
141+
"PLC0415", # import-outside-toplevel
142+
"PLR2004", # magic-value-comparison
143+
"PLR0913", # too-many-arguments
144+
"PLR0912", # too-many-branches
145+
"PLW0108", # unnecessary-lambda
146+
"PLW2901", # redefined-loop-name
147+
"PLR0915", # too-many-statements
148+
"PLR1714", # repeated-equality-comparison
149+
"PLR0911", # too-many-return-statements
150+
"PLR5501", # collapsible-else-if
151+
"PLW0603", # global-statement
152+
"PLR1730", # if-stmt-min-max
153+
"PLW1641", # eq-without-hash
154+
"PLW0602", # global-variable-not-assigned
155+
"PLC1802", # len-test
156+
"PLC3002", # unnecessary-direct-lambda-call
157+
"PLW0642", # self-or-cls-assignment
158+
"PLR1733", # unnecessary-dict-index-lookup
159+
"PLR0402", # manual-from-import
160+
"PLC0132", # type-param-name-mismatch
161+
"PLC0206", # dict-index-missing-items
162+
"PLC0207", # missing-maxsplit-arg
163+
"PLR1704", # redefined-argument-from-local
164+
"PLR1711", # useless-return
165+
"PLW0406", # import-self
166+
"PLW3301", # nested-min-max
167+
"PLR2044", # empty-comment
167168
]
169+
170+
# Allow fix for all enabled rules (when --fix) is provided.
168171
fixable = ["ALL"]
169172
unfixable = []
173+
174+
# Allow unused variables when underscore-prefixed.
170175
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
171176

172177
[tool.pyrefly]
@@ -180,6 +185,11 @@ missing-attribute = "ignore"
180185
invalid-annotation = "ignore"
181186
redundant-condition = "ignore"
182187
untyped-import = "ignore"
188+
# Beam-specific supressions to keep pyrefly green
189+
# These are in descending order of instances.
190+
#
191+
# TODO(https://github.com/apache/beam/issues/37699): Reduce the number of
192+
# ignored checks.
183193
bad-param-name-override = "ignore"
184194
bad-override = "ignore"
185195
bad-argument-type = "ignore"

0 commit comments

Comments
 (0)