Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,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@v3
uses: github/codeql-action/autobuild@v4

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
4 changes: 2 additions & 2 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- run: scripts/install.ps1
shell: pwsh
- name: Analysing the code with Pyright
uses: jakebailey/pyright-action@v2
uses: jakebailey/pyright-action@v3
with:
version: PATH
working-directory: src/
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
# region https://github.com/pyinstaller/pyinstaller/issues/9204
- name: Set up Python for PyInstaller tk issue on Linux
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
allow-prereleases: true
python-version: ${{ matrix.python-version }}
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dev = [
#
# Linters & Formatters
"dprint-py>=0.50.0.0",
"mypy[faster-cache] >=1.18",
"mypy >=1.19",
"pyright[nodejs] >=1.1.400", # reportPrivateImportUsage behaviour change
{ include-group = "ruff" },
#
Expand Down Expand Up @@ -116,7 +116,6 @@ reportImportCycles = "information"
# Too strict. False positives on base classes
reportMissingSuperCall = "none"
reportPropertyTypeMismatch = "error"
reportShadowedImports = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportUnusedCallResult = "none"
Expand Down
4 changes: 4 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ ignore = [
"T20", # flake8-print
# This is a relatively small, low contributors project. Git blame suffice.
"TD002", # missing-todo-author
# We do work in __init__ modules
"RUF067", # non-empty-init-module

###
# TODO
###
"PTH", # flake8-use-pathlib
"RUF028", # invalid-formatter-suppression-comment, Is meant for the formatter, but false-positives
# Disabled until https://github.com/astral-sh/ruff/issues/23185 is fixed
"TC00",
]

# https://docs.astral.sh/ruff/settings/#isort
Expand Down
2 changes: 1 addition & 1 deletion src/split_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __value_from_filename(
if len(delimiters) != 2:
raise ValueError("delimiters parameter must contain exactly 2 characters")
try:
string_value = filename.split(delimiters[0], 1)[1].split(delimiters[1])[0]
string_value = filename.split(delimiters[0], 1)[1].split(delimiters[1], maxsplit=1)[0]
value = type(default_value)(string_value)
except IndexError, ValueError:
return default_value
Expand Down
5 changes: 2 additions & 3 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,8 @@ def run_tesseract(png: bytes):
@return: The recognized output string from tesseract.
"""
return (
subprocess.Popen( # noqa: S603 # Only using known literal strings or shutil.which result
TESSERACT_CMD, **subprocess_kwargs()
)
subprocess # noqa: S603 # Only using known literal strings or shutil.which result
.Popen(TESSERACT_CMD, **subprocess_kwargs())
.communicate(input=png)[0]
.decode()
)
Expand Down
Loading
Loading