Skip to content

Commit d8aed07

Browse files
Skylion007pytorchmergebot
authored andcommitted
[BE][Ez]: Enable ruff rule PLW1507. os.environ is not copied (pytorch#154120)
Enables a RUFF rule check against copying os.environ since its' actually a proxy object, not a dict so a shallow copy will be a noop which is rarely desired behavior. Pull Request resolved: pytorch#154120 Approved by: https://github.com/malfet
1 parent 54932d8 commit d8aed07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ select = [
168168
"PLW0406", # import self
169169
"PLW0711", # binary op exception
170170
"PLW1501", # bad open mode
171+
"PLW1507", # shallow copy os.environ
171172
"PLW1509", # preexec_fn not safe with threads
172173
"PLW2101", # useless lock statement
173174
"PLW3301", # nested min max

0 commit comments

Comments
 (0)