From 0467dceeeee63e6398f1ce0d7ebee42a2bca3f18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:24:14 +0000 Subject: [PATCH 1/2] chore(deps-dev): update ruff requirement from ~=0.8.6 to ~=0.9.0 Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.6...0.9.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 20d4f575..3c597cd6 100644 --- a/Pipfile +++ b/Pipfile @@ -10,7 +10,7 @@ pre-commit = "~=3.5" pytest = "~=8.3" pytest-cov = "~=5.0" python-dateutil = "~=2.9" -ruff = "~=0.8.6" +ruff = "~=0.9.0" tox = "~=4.23" types-python-dateutil = "~=2.9" From f99f117bdddeaf644790a7f983dc651127e01f8f Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sat, 11 Jan 2025 23:22:55 -0800 Subject: [PATCH 2/2] fix ruff --- .pre-commit-config.yaml | 2 +- appium/webdriver/webdriver.py | 5 ++--- script/release.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f17aa908..17b86e2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.1 + rev: v0.9.0 hooks: # Run the linter. - id: ruff diff --git a/appium/webdriver/webdriver.py b/appium/webdriver/webdriver.py index 200d5f91..565f974a 100644 --- a/appium/webdriver/webdriver.py +++ b/appium/webdriver/webdriver.py @@ -282,7 +282,7 @@ def _update_command_executor(self, keep_alive: bool) -> None: if not {direct_protocol, direct_host, direct_port, direct_path}.issubset(set(self.caps)): message = 'Direct connect capabilities from server were:\n' for key in [direct_protocol, direct_host, direct_port, direct_path]: - message += f'{key}: \'{self.caps.get(key, "")}\' ' + message += f"{key}: '{self.caps.get(key, '')}' " logger.debug(message) return @@ -331,8 +331,7 @@ def start_session(self, capabilities: Union[Dict, AppiumOptions], browser_profil session_id = get_response_value('sessionId') if not session_id: raise SessionNotCreatedException( - f'A valid W3C session creation response must contain a non-empty "sessionId" entry. ' - f'Got "{response}" instead' + f'A valid W3C session creation response must contain a non-empty "sessionId" entry. Got "{response}" instead' ) self.session_id = session_id self.caps = get_response_value('capabilities') or {} diff --git a/script/release.py b/script/release.py index ffab74f2..08ccab59 100644 --- a/script/release.py +++ b/script/release.py @@ -76,7 +76,7 @@ def upload_sdist(new_version_num): call_bash_script('twine upload "{}"'.format(push_file)) except Exception as e: print( - 'Failed to upload {} to pypi. ' 'Please fix the original error and push it again later. Original error: {}'.format( + 'Failed to upload {} to pypi. Please fix the original error and push it again later. Original error: {}'.format( push_file, e ) )