ruff/crates/ruff_python_stdlib/src
Aleksei Latyshev 9cdc578dd9
[flake8-builtins] Implement import, lambda, and module shadowing (#12546)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
Extend `flake8-builtins` to imports, lambda-arguments, and modules to be
consistent with original checker
[flake8_builtins](https://github.com/gforcada/flake8-builtins/blob/main/flake8_builtins.py).

closes #12540 

## Details

- Implement builtin-import-shadowing (A004)
- Stop tracking imports shadowing in builtin-variable-shadowing (A001)
in preview mode.
- Implement builtin-lambda-argument-shadowing (A005)
- Implement builtin-module-shadowing (A006)
  - Add new option `linter.flake8_builtins.builtins_allowed_modules`

## Test Plan

cargo test
2024-07-29 01:42:42 +00:00
..
builtins.rs [pylint] Include builtin warnings in useless-exception-statement (PLW0133) (#10394) 2024-03-13 15:26:11 -04:00
future.rs Rewrite a variety of .contains() calls as matches! statements (#5432) 2023-06-28 22:42:27 -04:00
identifiers.rs Add an explicit fast path for whitespace to is_identifier_continuation (#9532) 2024-01-16 08:23:43 +00:00
keyword.rs Remove some additional manual iterator matches (#5482) 2023-07-03 16:29:59 +00:00
lib.rs Introduce a ruff_python_semantic crate (#3865) 2023-04-04 16:50:47 +00:00
logging.rs Fix logging rules with whitespace around dot (#6022) 2023-07-24 05:14:48 +00:00
path.rs [flake8-builtins] Implement import, lambda, and module shadowing (#12546) 2024-07-29 01:42:42 +00:00
str.rs Slight speed-up for lowercase and uppercase identifier checks (#9798) 2024-02-03 14:40:41 +00:00
sys.rs Regenerate sys.rs with stdlibs==2024.5.15 (#11437) 2024-05-15 22:17:32 +00:00
typing.rs Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00