Skip to content

Commit

Permalink
Add COPY
Browse files Browse the repository at this point in the history
  • Loading branch information
harupy committed Nov 10, 2024
1 parent 0392553 commit 2f71db1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ impl Violation for ShallowCopyEnviron {

/// PLW1507
pub(crate) fn shallow_copy_environ(checker: &mut Checker, call: &ast::ExprCall) {
if !checker.semantic().seen_module(Modules::OS) {
if !(checker.semantic().seen_module(Modules::OS)
&& checker.semantic().seen_module(Modules::COPY))
{
return;
}

Expand Down
1 change: 1 addition & 0 deletions crates/ruff_python_semantic/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,7 @@ bitflags! {
const CONTEXTVARS = 1 << 19;
const ANYIO = 1 << 20;
const FASTAPI = 1 << 21;
const COPY = 1 << 22;
}
}

Expand Down

0 comments on commit 2f71db1

Please sign in to comment.