From 9080a090b17595fc278b4bcb03c61f8f4a98a9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bobob=20B=C3=A4ck=20Engstr=C3=B6m?= Date: Tue, 4 Aug 2026 08:51:56 +0200 Subject: [PATCH 1/2] chore(ci): keep CodeQL actions synchronized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeQL requires init, autobuild, analyze, and upload-sarif to use the same version. Group their Dependabot updates to prevent separate upgrades from breaking CI. Signed-off-by: Bobob Bäck Engström --- .github/dependabot.yml | 4 ++++ .github/workflows/codeql.yml | 6 +++--- .github/workflows/scorecard.yaml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fbf92bd..73e5d21 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,10 @@ updates: directory: / schedule: interval: weekly + groups: + codeql: + patterns: + - "github/codeql-action/*" cooldown: semver-minor-days: 7 semver-patch-days: 7 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ce17f26..3ab4f14 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,7 +50,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -60,7 +60,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -73,6 +73,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 9c298d1..bc69e6b 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -62,6 +62,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 + uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3 with: sarif_file: results.sarif From 7f7fe78a3a7f4c026d19abaf860e37e00f8915c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bobob=20B=C3=A4ck=20Engstr=C3=B6m?= Date: Tue, 4 Aug 2026 08:51:56 +0200 Subject: [PATCH 2/2] chore(lint): support Ruff 0.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ruff 0.16 requires the README example indentation change for `ruff format --diff .` to pass. CPY001 requires a copyright header in every Python file; this project keeps its copyright notice in LICENSE, so ignore the rule instead of duplicating headers across the source tree. Signed-off-by: Bobob Bäck Engström --- README.md | 14 +++++++------- pyproject.toml | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9f3cc4a..07c0fe7 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ from pymodbus.client import ModbusSerialClient # Configure the Modbus client client = ModbusSerialClient( - port="COM3", # or "/dev/ttyUSB0" on Linux - baudrate=9600, - parity="E", - stopbits=1, - bytesize=8, - # datasheet specifies maximum response timeout of 500ms (typical 40ms) - timeout=0.5, + port="COM3", # or "/dev/ttyUSB0" on Linux + baudrate=9600, + parity="E", + stopbits=1, + bytesize=8, + # datasheet specifies maximum response timeout of 500ms (typical 40ms) + timeout=0.5, ) # Device Modbus address diff --git a/pyproject.toml b/pyproject.toml index 765977a..aacfed0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,7 @@ select = ["ALL"] ignore = [ "COM812", # in conflict with formatter + "CPY001", # project copyright is declared in LICENSE ] [tool.ruff.lint.pydocstyle]