Skip to content

Commit a47e2b6

Browse files
Ruff: Add PLW0603 (#13097)
1 parent 2f85b1f commit a47e2b6

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ select = [
8585
"PLC01", "PLC02", "PLC0414", "PLC18", "PLC24", "PLC28", "PLC3",
8686
"PLE",
8787
"PLR01", "PLR02", "PLR04", "PLR0915", "PLR1711", "PLR1704", "PLR1714", "PLR1716", "PLR172", "PLR173", "PLR2044", "PLR5", "PLR6104", "PLR6201",
88-
"PLW01", "PLW02", "PLW04", "PLW0602", "PLW0604", "PLW07", "PLW1", "PLW2", "PLW3",
88+
"PLW01", "PLW02", "PLW04", "PLW0602", "PLW0603", "PLW0604", "PLW07", "PLW1", "PLW2", "PLW3",
8989
"UP",
9090
"FURB",
9191
"RUF",

tests/base_test_class.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ def setUpClass(cls):
5757
# Path for automatic downloads, mapped to the media path
5858
cls.export_path = "/app"
5959

60-
global dd_driver
60+
global dd_driver # noqa: PLW0603 global variables are dirty, but in unit tests scenario's like these they are acceptable
6161
if not dd_driver:
6262
# setupModule and tearDownModule are not working in our scenario, so for now we use setupClass and a global variable
63-
# global variables are dirty, but in unit tests scenario's like these they are acceptable
6463
logger.info(f"launching browser for: {cls.__name__}")
65-
global dd_driver_options
64+
global dd_driver_options # noqa: PLW0603 global variables are dirty, but in unit tests scenario's like these they are acceptable
6665
dd_driver_options = Options()
6766

6867
# headless means no UI, if you want to see what is happening remove headless. Adding detach will leave the window open after the test

0 commit comments

Comments
 (0)