diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a335225c22..9e07b4c349 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,13 +119,10 @@ 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@v1 + - uses: astral-sh/ruff-action@v2 with: - version: "0.4.9" - - uses: astral-sh/ruff-action@v1 - with: - version: "0.4.9" - args: "format --check" + version: "0.8.2" + - run: ruff format --check - run: | # Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary clang-format --Werror --dry-run $(git ls-files '*.cpp' ':!:com/win32comext/mapi/src/MAPIStubLibrary/') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2f2eff964..d18ed5dddd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: args: [--config=pycln.toml] verbose: true - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.5 + rev: v0.8.2 hooks: - id: ruff # Run the linter. args: [--fix] diff --git a/ruff.toml b/ruff.toml index 315a9d41fb..dc71869af8 100644 --- a/ruff.toml +++ b/ruff.toml @@ -34,11 +34,12 @@ select = [ "UP037", # quoted-annotation # Helps prevent circular imports and other unneeded imports - "TCH", # flake8-type-checking + "TC", # flake8-type-checking ] -extend-ignore = [ +ignore = [ + "PLE0704", # misplaced-bare-raise: TODO # No such concerns for stdlib - "TCH003", # typing-only-standard-library-import + "TC003", # typing-only-standard-library-import ] [lint.per-file-ignores]