Skip to content

Commit

Permalink
Bump GitHub actions and checkers (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Jan 8, 2025
1 parent ca86554 commit 0ea624e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ jobs:
cache-dependency-path: .github/workflows/main.yml
- run: pip install clang-format==18.1.* pycln
- run: pycln . --config=pycln.toml --check
- uses: astral-sh/ruff-action@v2
- uses: astral-sh/ruff-action@v3
with:
version: "0.8.2"
version: "0.8.4"
- run: ruff format --check
- run:
| # Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary
Expand All @@ -153,7 +153,7 @@ jobs:
cache: pip
cache-dependency-path: .github/workflows/main.yml
check-latest: true
- run: pip install types-setuptools PyOpenGL mypy==1.11
- run: pip install types-setuptools PyOpenGL mypy[faster-cache]==1.14.*
- run: mypy . --python-version=${{ matrix.python-version }}

pyright:
Expand All @@ -176,5 +176,5 @@ jobs:
- uses: jakebailey/pyright-action@v2
with:
python-version: ${{ matrix.python-version }}
version: "1.1.358"
version: "1.1.389"
annotate: errors
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# You can run this locally with `pre-commit run [--all]`
# You can run this locally with `pre-commit run --all`
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
Expand All @@ -10,10 +10,11 @@ repos:
args: [--fix=crlf]
- id: check-case-conflict
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --trailing-commas, --inline-comment-spaces, "1", --no-sort]
# Has unsafe autofixes. Let's find a better formatter: macisamuele/language-formatters-pre-commit-hooks#202
# - id: pretty-format-toml
# args: [--autofix, --trailing-commas, --inline-comment-spaces, "1", --no-sort]
- id: pretty-format-yaml
args: [--autofix, --indent, "2", --offset, "2", --preserve-quotes]
- id: pretty-format-ini
Expand All @@ -25,7 +26,7 @@ repos:
args: [--config=pycln.toml]
verbose: true
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
rev: v0.8.4
hooks:
- id: ruff # Run the linter.
args: [--fix]
Expand Down
10 changes: 8 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ target-version = "py38" # Target the oldest supported version in editors and def
# This file is not UTF-8
extend-exclude = ["Pythonwin/pywin/test/_dbgscript.py"]

[format]
line-ending = "cr-lf"

[lint]
select = [
"C4", # flake8-comprehensions
Expand Down Expand Up @@ -36,8 +39,11 @@ select = [
# Helps prevent circular imports and other unneeded imports
"TC", # flake8-type-checking
]
ignore = [
"PLE0704", # misplaced-bare-raise: TODO

extend-ignore = [
# TODO: Consider passing exception around to ensure methods are only ever used within exception handlers
"PLE0704", # misplaced-bare-raise

# No such concerns for stdlib
"TC003", # typing-only-standard-library-import
]
Expand Down

0 comments on commit 0ea624e

Please sign in to comment.