Skip to content

Commit d82a080

Browse files
authored
Update dev tooling versions (#343)
1 parent d01345e commit d82a080

7 files changed

Lines changed: 90 additions & 84 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v3
42+
uses: github/codeql-action/init@v4
4343
with:
4444
languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v3
53+
uses: github/codeql-action/autobuild@v4
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
6464
# make release
6565

6666
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v3
67+
uses: github/codeql-action/analyze@v4

.github/workflows/lint-and-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- run: scripts/install.ps1
6161
shell: pwsh
6262
- name: Analysing the code with Pyright
63-
uses: jakebailey/pyright-action@v2
63+
uses: jakebailey/pyright-action@v3
6464
with:
6565
version: PATH
6666
working-directory: src/
@@ -95,7 +95,7 @@ jobs:
9595
# region https://github.com/pyinstaller/pyinstaller/issues/9204
9696
- name: Set up Python for PyInstaller tk issue on Linux
9797
if: ${{ startsWith(matrix.os, 'ubuntu') }}
98-
uses: actions/setup-python@v5
98+
uses: actions/setup-python@v6
9999
with:
100100
allow-prereleases: true
101101
python-version: ${{ matrix.python-version }}

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dev = [
5353
#
5454
# Linters & Formatters
5555
"dprint-py>=0.50.0.0",
56-
"mypy[faster-cache] >=1.18",
56+
"mypy >=1.19",
5757
"pyright[nodejs] >=1.1.400", # reportPrivateImportUsage behaviour change
5858
{ include-group = "ruff" },
5959
#
@@ -116,7 +116,6 @@ reportImportCycles = "information"
116116
# Too strict. False positives on base classes
117117
reportMissingSuperCall = "none"
118118
reportPropertyTypeMismatch = "error"
119-
reportShadowedImports = "error"
120119
reportUninitializedInstanceVariable = "error"
121120
reportUnnecessaryTypeIgnoreComment = "error"
122121
reportUnusedCallResult = "none"

ruff.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ ignore = [
1111
"T20", # flake8-print
1212
# This is a relatively small, low contributors project. Git blame suffice.
1313
"TD002", # missing-todo-author
14+
# We do work in __init__ modules
15+
"RUF067", # non-empty-init-module
1416

1517
###
1618
# TODO
1719
###
1820
"PTH", # flake8-use-pathlib
1921
"RUF028", # invalid-formatter-suppression-comment, Is meant for the formatter, but false-positives
22+
# Disabled until https://github.com/astral-sh/ruff/issues/23185 is fixed
23+
"TC00",
2024
]
2125

2226
# https://docs.astral.sh/ruff/settings/#isort

src/split_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __value_from_filename(
4141
if len(delimiters) != 2:
4242
raise ValueError("delimiters parameter must contain exactly 2 characters")
4343
try:
44-
string_value = filename.split(delimiters[0], 1)[1].split(delimiters[1])[0]
44+
string_value = filename.split(delimiters[0], 1)[1].split(delimiters[1], maxsplit=1)[0]
4545
value = type(default_value)(string_value)
4646
except IndexError, ValueError:
4747
return default_value

src/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,8 @@ def run_tesseract(png: bytes):
310310
@return: The recognized output string from tesseract.
311311
"""
312312
return (
313-
subprocess.Popen( # noqa: S603 # Only using known literal strings or shutil.which result
314-
TESSERACT_CMD, **subprocess_kwargs()
315-
)
313+
subprocess # noqa: S603 # Only using known literal strings or shutil.which result
314+
.Popen(TESSERACT_CMD, **subprocess_kwargs())
316315
.communicate(input=png)[0]
317316
.decode()
318317
)

0 commit comments

Comments
 (0)