Skip to content

Commit

Permalink
chore: add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Dec 12, 2024
1 parent 392b43f commit 7cc517d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions superset/utils/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)
from selenium.webdriver import chrome, firefox, FirefoxProfile
from selenium.webdriver.common.by import By
from selenium.webdriver.common.service import Service
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
Expand Down Expand Up @@ -248,8 +249,8 @@ class WebDriverSelenium(WebDriverProxy):
def create(self) -> WebDriver:
pixel_density = current_app.config["WEBDRIVER_WINDOW"].get("pixel_density", 1)
if self._driver_type == "firefox":
driver_class = firefox.webdriver.WebDriver
service_class = firefox.service.Service
driver_class: type[WebDriver] = firefox.webdriver.WebDriver
service_class: type[Service] = firefox.service.Service
options = firefox.options.Options()
profile = FirefoxProfile()
profile.set_preference("layout.css.devPixelsPerPx", str(pixel_density))
Expand All @@ -268,7 +269,7 @@ def create(self) -> WebDriver:
)

# Prepare args for the webdriver init
for arg in current_app.config["WEBDRIVER_OPTION_ARGS"]:
for arg in list(current_app.config["WEBDRIVER_OPTION_ARGS"]):
options.add_argument(arg)

# Add additional configured webdriver options
Expand Down

0 comments on commit 7cc517d

Please sign in to comment.