Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,38 @@ respect-gitignore = true
target-version = "py39"

[tool.ruff.lint]
extend-select = ["E4", "E7", "E9", "F", "I", "E501", "RUF022", "TID252"]
extend-select = ["E4", "E7", "E9", "F", "I", "E501", "RUF022", "TID252", "D"]
fixable = ["ALL"]

extend-ignore = [
"D103", # Missing docstring in public function
"D102", # Missing docstring in public method
"D100", # Missing docstring in public module
"D205", # 1 blank line required between summary line and description
"D107", # Missing docstring in `__init__`
"D101", # Missing docstring in public class
"D104", # Missing docstring in public package
"D209", # Multi-line docstring closing quotes should be on a separate line
"D202", # No blank lines allowed after function docstring (found 1)
"D105", # Missing docstring in magic method
"D415", # First line should end with a period, question mark, or exclamation point
"D212", # Multi-line docstring summary should start at the first line
"D200", # One-line docstring should fit on one line
"D411", # Missing blank line before section ("Example")
"D301", # Use `r"""` if any backslashes in a docstring
"D412", # No blank lines allowed between a section header and its content ("Example")
"D410", # Missing blank line after section ("Example")
"D419", # Docstring is empty
"D417", # Missing argument descriptions in the docstring for `__init__`: `duration`, `source`
"D416" # Section name should end with a colon ("Returns")
]

[tool.ruff.lint.per-file-ignores]
"*.py" = ["D"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 120
16 changes: 11 additions & 5 deletions py/selenium/webdriver/chrome/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ class Service(service.ChromiumService):
"""A Service class that is responsible for the starting and stopping of
`chromedriver`.

:param executable_path: install path of the chromedriver executable, defaults to `chromedriver`.
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable.
:param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
Args:
executable_path: Install path of the chromedriver executable, defaults
to `chromedriver`.
port: Port for the service to run on, defaults to 0 where the operating
system will decide.
service_args: (Optional) Sequence of args to be passed to the subprocess
when launching the executable.
log_output: (Optional) int representation of STDOUT/DEVNULL, any IO
instance or String path to file.
env: (Optional) Mapping of environment variables for the new process,
defaults to `os.environ`.
"""

def __init__(
Expand Down
18 changes: 12 additions & 6 deletions py/selenium/webdriver/chromium/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ class ChromiumService(service.Service):
"""A Service class that is responsible for the starting and stopping the
WebDriver instance of the ChromiumDriver.

:param executable_path: install path of the executable.
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable.
:param log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
:param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
Args:
executable_path: Install path of the executable.
port: Port for the service to run on, defaults to 0 where the operating
system will decide.
service_args: (Optional) Sequence of args to be passed to the subprocess
when launching the executable.
log_output: (Optional) int representation of STDOUT/DEVNULL, any IO
instance or String path to file.
env: (Optional) Mapping of environment variables for the new process,
defaults to `os.environ`.
driver_path_env_key: (Optional) Environment variable to use to get the
path to the driver executable.
"""

def __init__(
Expand Down
18 changes: 11 additions & 7 deletions py/selenium/webdriver/webkitgtk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ class Service(service.Service):
"""A Service class that is responsible for the starting and stopping of
`WebKitWebDriver`.

:param executable_path: install path of the WebKitWebDriver executable, defaults to the first
`WebKitWebDriver` in `$PATH`.
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable.
:param log_output: (Optional) File path for the file to be opened and passed as the subprocess
stdout/stderr handler.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
Args:
executable_path: Install path of the WebKitWebDriver executable,
defaults to the first `WebKitWebDriver` in `$PATH`.
port: Port for the service to run on, defaults to 0 where the
operating system will decide.
service_args: (Optional) Sequence of args to be passed to the
subprocess when launching the executable.
log_output: (Optional) File path for the file to be opened and passed
as the subprocess stdout/stderr handler.
env: (Optional) Mapping of environment variables for the new process,
defaults to `os.environ`.
"""

def __init__(
Expand Down
18 changes: 11 additions & 7 deletions py/selenium/webdriver/wpewebkit/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ class Service(service.Service):
"""A Service class that is responsible for the starting and stopping of
`WPEWebDriver`.

:param executable_path: install path of the WPEWebDriver executable, defaults to the first
`WPEWebDriver` in `$PATH`.
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable.
:param log_output: (Optional) File path for the file to be opened and passed as the subprocess
stdout/stderr handler.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
Args:
executable_path: Install path of the WPEWebDriver executable, defaults
to the first `WPEWebDriver` in `$PATH`.
port: Port for the service to run on, defaults to 0 where the
operating system will decide.
service_args: (Optional) Sequence of args to be passed to the
subprocess when launching the executable.
log_output: (Optional) File path for the file to be opened and passed
as the subprocess stdout/stderr handler.
env: (Optional) Mapping of environment variables for the new process,
defaults to `os.environ`.
"""

def __init__(
Expand Down