Skip to content

Commit 8a60fea

Browse files
committed
[py]: set stacklevel=2 on warning calls without it
1 parent 66f092f commit 8a60fea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/chromium/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def add_experimental_option(self, name: str, value: Union[str, int, dict, List[s
133133
value: The option value.
134134
"""
135135
if name.lower() == "w3c" and (value == "false" or value is False):
136-
warnings.warn(UserWarning("Manipulating `w3c` setting can have unintended consequences."))
136+
warnings.warn(UserWarning("Manipulating `w3c` setting can have unintended consequences."), stacklevel=2)
137137
self._experimental_options[name] = value
138138

139139
@property

0 commit comments

Comments
 (0)