From 411305e96ffab6cf51b0c8e69e086a25d311149c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:05:50 +0000 Subject: [PATCH 1/2] chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.15.22 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a09e60834..949d6ca90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.13 + rev: v0.15.22 hooks: - id: ruff-check args: From 469bd334c376e81263cedb053a29ad985c16dd0e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:07:22 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/async.py | 4 ++-- examples/dummy_phone.py | 2 +- examples/filesystem_test.py | 2 +- examples/read_sms_backup.py | 2 +- gammu/__init__.py | 4 ++-- gammu/asyncworker.py | 2 +- gammu/exception.py | 2 +- gammu/worker.py | 2 +- setup.py | 4 ++-- test/test_dummy.py | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/async.py b/examples/async.py index 324a03671..143422073 100755 --- a/examples/async.py +++ b/examples/async.py @@ -102,12 +102,12 @@ async def main() -> None: try: signal = await worker.get_signal_quality_async() print(f"Signal is at {signal['SignalPercent']:d}%") - except Exception as e: # noqa: BLE001 + except Exception as e: # ruff:ignore[blind-except] print(f"Exception reading signal: {e}") await asyncio.sleep(10) - except Exception as e: # noqa: BLE001 + except Exception as e: # ruff:ignore[blind-except] print("Exception:") print(e) diff --git a/examples/dummy_phone.py b/examples/dummy_phone.py index 431b4c452..7db9dedfe 100755 --- a/examples/dummy_phone.py +++ b/examples/dummy_phone.py @@ -125,7 +125,7 @@ def print_all_sms(sms, folders) -> None: def link_all_sms(sms, folders) -> None: data = gammu.LinkSMS([[msg] for msg in sms]) - for x in data: # noqa: PLR1702 + for x in data: # ruff:ignore[too-many-nested-blocks] v = gammu.DecodeSMS(x) m = x[0] diff --git a/examples/filesystem_test.py b/examples/filesystem_test.py index 20ecd4b94..ae2cff661 100755 --- a/examples/filesystem_test.py +++ b/examples/filesystem_test.py @@ -53,7 +53,7 @@ import gammu -def main() -> None: # noqa: PLR0912, PLR0915, C901 +def main() -> None: # ruff:ignore[too-many-branches, too-many-statements, complex-structure] parser = argparse.ArgumentParser(usage="usage: %(prog)s [options]") parser.add_argument( diff --git a/examples/read_sms_backup.py b/examples/read_sms_backup.py index 5e04cb721..dd38abc64 100755 --- a/examples/read_sms_backup.py +++ b/examples/read_sms_backup.py @@ -43,7 +43,7 @@ def main() -> None: data = gammu.LinkSMS(messages) - for message in data: # noqa: PLR1702 + for message in data: # ruff:ignore[too-many-nested-blocks] decoded = gammu.DecodeSMS(message) part = message[0] diff --git a/gammu/__init__.py b/gammu/__init__.py index 551043bbb..e4b2d1d93 100644 --- a/gammu/__init__.py +++ b/gammu/__init__.py @@ -20,6 +20,6 @@ # """Phone communication library - python wrapper for Gammu library.""" -from gammu._gammu import * # noqa: F403 +from gammu._gammu import * # ruff:ignore[undefined-local-with-import-star] -__version__ = "Gammu {}, python-gammu {}".format(*Version()) # noqa: F405 +__version__ = "Gammu {}, python-gammu {}".format(*Version()) # ruff:ignore[undefined-local-with-import-star-usage] diff --git a/gammu/asyncworker.py b/gammu/asyncworker.py index 09a28ab5b..e201ee1d3 100644 --- a/gammu/asyncworker.py +++ b/gammu/asyncworker.py @@ -47,7 +47,7 @@ def _do_command(self, future, cmd, params, percentage=100) -> None: error = gammu.ErrorNumbers[errcode] self._callback(future, result, error, percentage) # pylint: disable-next=broad-except - except Exception as exception: # noqa: BLE001 + except Exception as exception: # ruff:ignore[blind-except] self._callback(future, None, exception, percentage) else: self._callback(future, result, None, percentage) diff --git a/gammu/exception.py b/gammu/exception.py index 5e5914304..613832fd2 100644 --- a/gammu/exception.py +++ b/gammu/exception.py @@ -33,7 +33,7 @@ continue _temp = __import__("gammu._gammu", globals(), locals(), [_name], 0) locals()[_name] = getattr(_temp, _name) - __all__.append(_name) # noqa: PYI056 + __all__.append(_name) # ruff:ignore[unsupported-method-call-on-all] # Cleanup del _name diff --git a/gammu/worker.py b/gammu/worker.py index 1a7040db1..daf201555 100644 --- a/gammu/worker.py +++ b/gammu/worker.py @@ -219,7 +219,7 @@ def run(self) -> None: # Read the device to catch possible incoming events try: self._pull_func(self._sm) - except Exception as ex: # noqa: BLE001 + except Exception as ex: # ruff:ignore[blind-except] self._callback("ReadDevice", None, ex, 0) def kill(self) -> None: diff --git a/setup.py b/setup.py index d4127740e..6d6e060e1 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ import os import platform -import subprocess # noqa: S404 +import subprocess # ruff:ignore[suspicious-subprocess-import] import sys from pathlib import Path from typing import cast @@ -79,7 +79,7 @@ def lookup_path(self) -> Path | None: def check_version(self) -> None: if self.use_pkgconfig: try: - subprocess.check_output( # noqa: S603 + subprocess.check_output( # ruff:ignore[subprocess-without-shell-equals-true] [ "pkg-config", "--print-errors", diff --git a/test/test_dummy.py b/test/test_dummy.py index 2eb132d2b..6e35554ee 100644 --- a/test/test_dummy.py +++ b/test/test_dummy.py @@ -97,7 +97,7 @@ def call_callback(self, state_machine, response, data) -> None: assert data["Number"] == "+800123456" -class BasicDummyTest(DummyTest): # noqa: PLR0904 +class BasicDummyTest(DummyTest): # ruff:ignore[too-many-public-methods] def test_model(self) -> None: state_machine = self.get_statemachine() assert state_machine.GetModel()[1] == "Dummy"