Skip to content

Commit 6307ae6

Browse files
committed
Fix ruff linter errors in test_container_shell
SLF001 (private member accessed) is expected in tests that exercise module internals directly. Suppress it via per-file-ignores for tests/*. PLW0603 (global statement used for assignment) is the correct pattern for the module-level container ID state. Add to the global ignore list alongside the existing PLW0602 exemption.
1 parent 04d652d commit 6307ae6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ignore = [
9292
"PLR1730", # Replace `if` statement with `min()`
9393
"PLR2004", # Magic value used in comparison
9494
"PLW0602", # Using global for variable but no assignment is done
95+
"PLW0603", # Using the global statement to update a variable is discouraged
9596
"PLW1508", # Invalid type for environment variable default
9697
"PLW1510", # `subprocess.run` without explicit `check` argument
9798
"RET504", # Unnecessary assignment before `return` statement
@@ -113,3 +114,8 @@ ignore = [
113114
"W291", # Trailing whitespace
114115
"W293", # Blank line contains whitespace
115116
]
117+
118+
[tool.ruff.lint.per-file-ignores]
119+
"tests/*" = [
120+
"SLF001", # Private member accessed (tests legitimately access module internals)
121+
]

0 commit comments

Comments
 (0)