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/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" 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 ) )