Commit 85f7871
authored
## Summary
This PR changes the default value of
`lint.flake8-builtins.builtins-strict-checking` added in
#15951 from `true` to `false`.
This also allows simplifying the default option logic and removes the
dependence on preview mode.
#15399 was already closed by
#15951, but this change will finalize the behavior mentioned in
#15399 (comment).
As an example, strict checking flags modules based on their last
component, so `utils/logging.py` triggers A005. Non-strict checking
checks the path to the module, so `utils/logging.py` is allowed (this is
the example and desired behavior from #15399 exactly) but a top-level
`logging.py` or `logging/__init__.py` is still disallowed.
## Test Plan
Existing tests from #15951 and #16006, with the snapshot updated in
`a005_module_shadowing_strict_default` to reflect the new default.
1 parent daeb8f1 commit 85f7871
File tree
8 files changed
+23
-46
lines changed- crates
- ruff_linter/src/rules/flake8_builtins
- rules
- ruff_workspace/src
- ruff/tests
- snapshots
8 files changed
+23
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2556 | 2556 | | |
2557 | 2557 | | |
2558 | 2558 | | |
2559 | | - | |
2560 | | - | |
2561 | | - | |
2562 | | - | |
2563 | | - | |
| 2559 | + | |
2564 | 2560 | | |
2565 | 2561 | | |
2566 | 2562 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 14 | | |
25 | 15 | | |
26 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 238 | | |
246 | 239 | | |
247 | 240 | | |
| |||
344 | 337 | | |
345 | 338 | | |
346 | 339 | | |
347 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
348 | 344 | | |
349 | 345 | | |
350 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
| 1270 | + | |
1271 | 1271 | | |
1272 | | - | |
| 1272 | + | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | | - | |
1284 | | - | |
1285 | 1283 | | |
1286 | | - | |
| 1284 | + | |
1287 | 1285 | | |
1288 | | - | |
| 1286 | + | |
1289 | 1287 | | |
1290 | 1288 | | |
1291 | 1289 | | |
1292 | 1290 | | |
1293 | 1291 | | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
| 1292 | + | |
1298 | 1293 | | |
1299 | 1294 | | |
1300 | 1295 | | |
| |||
1309 | 1304 | | |
1310 | 1305 | | |
1311 | 1306 | | |
1312 | | - | |
| 1307 | + | |
1313 | 1308 | | |
1314 | 1309 | | |
1315 | 1310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments