From c044441a0d2bf1e24884ac48fca52557fb937ee7 Mon Sep 17 00:00:00 2001 From: symonk Date: Wed, 8 Feb 2023 21:23:46 +0000 Subject: [PATCH] [py]: Bump `black` & `isort` versions --- py/selenium/webdriver/remote/remote_connection.py | 1 - py/test/selenium/webdriver/chrome/proxy_tests.py | 1 - py/test/selenium/webdriver/common/upload_tests.py | 3 --- .../webdriver/common/virtual_authenticator_tests.py | 1 - .../selenium/webdriver/common/w3c_interaction_tests.py | 1 - .../webdriver/virtual_authenticator/credentials_test.py | 1 - py/tox.ini | 8 ++++---- 7 files changed, 4 insertions(+), 12 deletions(-) diff --git a/py/selenium/webdriver/remote/remote_connection.py b/py/selenium/webdriver/remote/remote_connection.py index 3c4712c18e490..ef5ce2ec409b3 100644 --- a/py/selenium/webdriver/remote/remote_connection.py +++ b/py/selenium/webdriver/remote/remote_connection.py @@ -326,7 +326,6 @@ def _request(self, method, url, body=None): if response.headers.get("Content-Type", None): content_type = response.headers.get("Content-Type", None).split(";") if not any([x.startswith("image/png") for x in content_type]): - try: data = utils.load_json(data.strip()) except ValueError: diff --git a/py/test/selenium/webdriver/chrome/proxy_tests.py b/py/test/selenium/webdriver/chrome/proxy_tests.py index c1372fe6e970d..45e7084d7fa33 100644 --- a/py/test/selenium/webdriver/chrome/proxy_tests.py +++ b/py/test/selenium/webdriver/chrome/proxy_tests.py @@ -23,7 +23,6 @@ def test_bad_proxy_doesnt_interfere(): - # these values should be ignored if ignore_local_proxy_environment_variables() is called. os.environ["https_proxy"] = "bad" os.environ["http_proxy"] = "bad" diff --git a/py/test/selenium/webdriver/common/upload_tests.py b/py/test/selenium/webdriver/common/upload_tests.py index bd29306dfa200..9cca2a4d5979c 100644 --- a/py/test/selenium/webdriver/common/upload_tests.py +++ b/py/test/selenium/webdriver/common/upload_tests.py @@ -34,7 +34,6 @@ def wrapped(filename): def test_can_upload_file(driver, pages, get_local_path): - pages.load("upload.html") driver.find_element(By.ID, "upload").send_keys(get_local_path("test_file.txt")) @@ -46,7 +45,6 @@ def test_can_upload_file(driver, pages, get_local_path): def test_can_upload_two_files(driver, pages, get_local_path): - pages.load("upload.html") two_file_paths = get_local_path("test_file.txt") + "\n" + get_local_path("test_file2.txt") driver.find_element(By.ID, "upload").send_keys(two_file_paths) @@ -62,7 +60,6 @@ def test_can_upload_two_files(driver, pages, get_local_path): @pytest.mark.xfail_chrome @pytest.mark.xfail_safari def test_file_is_uploaded_to_remote_machine_on_select(driver, pages, get_local_path): - uploaded_files = [] original_upload_func = WebElement._upload diff --git a/py/test/selenium/webdriver/common/virtual_authenticator_tests.py b/py/test/selenium/webdriver/common/virtual_authenticator_tests.py index 74f6187f47b61..26c439a6a41bd 100644 --- a/py/test/selenium/webdriver/common/virtual_authenticator_tests.py +++ b/py/test/selenium/webdriver/common/virtual_authenticator_tests.py @@ -57,7 +57,6 @@ def create_rk_enabled_u2f_authenticator(driver) -> WebDriver: - options = VirtualAuthenticatorOptions() options.protocol = VirtualAuthenticatorOptions.Protocol.U2F options.has_resident_key = True diff --git a/py/test/selenium/webdriver/common/w3c_interaction_tests.py b/py/test/selenium/webdriver/common/w3c_interaction_tests.py index 4ce7920c7ca77..5ecd33a715b12 100644 --- a/py/test/selenium/webdriver/common/w3c_interaction_tests.py +++ b/py/test/selenium/webdriver/common/w3c_interaction_tests.py @@ -133,7 +133,6 @@ def test_drag_and_drop(driver, pages): def test_context_click(driver, pages): - pages.load("javascriptPage.html") toContextClick = driver.find_element(By.ID, "doubleClickField") diff --git a/py/test/unit/selenium/webdriver/virtual_authenticator/credentials_test.py b/py/test/unit/selenium/webdriver/virtual_authenticator/credentials_test.py index 6bc82bc11df04..f5df75957b51a 100644 --- a/py/test/unit/selenium/webdriver/virtual_authenticator/credentials_test.py +++ b/py/test/unit/selenium/webdriver/virtual_authenticator/credentials_test.py @@ -56,7 +56,6 @@ def data() -> Tuple: def test_rk_enabled_credential(data): - _id, rp_id, user_handle, privatekey, sign_count = data credential = Credential.create_resident_credential(_id, rp_id, user_handle, privatekey, sign_count) diff --git a/py/tox.ini b/py/tox.ini index d6959b583eac0..873dfb392f432 100644 --- a/py/tox.ini +++ b/py/tox.ini @@ -35,8 +35,8 @@ force_single_line = True ; checks linting for CI with stricter exiting when failing. skip_install = true deps = - isort==5.11.4 - black==22.12.0 + isort==5.12.0 + black==23.1.0 ; flake8 6+ requires python3.8+ specifically. flake8==5.0.4 flake8-typing-imports==1.14.0 @@ -55,8 +55,8 @@ commands = ; IMPORTANT: black & isort rewrite files, flake8 merely alerts to the failure. skip_install = true deps = - isort==5.11.4 - black==22.12.0 + isort==5.12.0 + black==23.1.0 ; flake8 6+ requires python3.8+ specifically. flake8==5.0.4 flake8-typing-imports==1.14.0