mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
Implement shallow-copy-environ / W1507
(#14241)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Related to #970. Implement [`shallow-copy-environ / W1507`](https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/shallow-copy-environ.html). ## Test Plan <!-- How was it tested? --> Unit test --------- Co-authored-by: Simon Brugman <sbrugman@users.noreply.github.com> Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
5d91ba0b10
commit
d4cf61d98b
9 changed files with 122 additions and 0 deletions
|
@ -1266,6 +1266,7 @@ impl<'a> SemanticModel<'a> {
|
|||
"anyio" => self.seen.insert(Modules::ANYIO),
|
||||
"builtins" => self.seen.insert(Modules::BUILTINS),
|
||||
"collections" => self.seen.insert(Modules::COLLECTIONS),
|
||||
"copy" => self.seen.insert(Modules::COPY),
|
||||
"contextvars" => self.seen.insert(Modules::CONTEXTVARS),
|
||||
"dataclasses" => self.seen.insert(Modules::DATACLASSES),
|
||||
"datetime" => self.seen.insert(Modules::DATETIME),
|
||||
|
@ -1856,6 +1857,7 @@ bitflags! {
|
|||
const CONTEXTVARS = 1 << 19;
|
||||
const ANYIO = 1 << 20;
|
||||
const FASTAPI = 1 << 21;
|
||||
const COPY = 1 << 22;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue