diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 633e3648..46da7fc9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.9 + rev: v0.15.6 hooks: - - id: ruff + - id: ruff-check args: [--fix, --unsafe-fixes] - id: ruff-format diff --git a/distutils/compilers/C/base.py b/distutils/compilers/C/base.py index 4159feae..84bbf322 100644 --- a/distutils/compilers/C/base.py +++ b/distutils/compilers/C/base.py @@ -70,7 +70,7 @@ class Compiler: # dictionary (see below -- used by the 'new_compiler()' factory # function) -- authors of new compiler interface classes are # responsible for updating 'compiler_class'! - compiler_type: ClassVar[str] = None # type: ignore[assignment] + compiler_type: ClassVar[str] = None # XXX things not handled by this compiler abstraction model: # * client can't provide additional options for a compiler, diff --git a/distutils/compilers/C/msvc.py b/distutils/compilers/C/msvc.py index 1f50fa50..a2ea3ce0 100644 --- a/distutils/compilers/C/msvc.py +++ b/distutils/compilers/C/msvc.py @@ -95,7 +95,8 @@ def _find_vc2017(): subprocess.CalledProcessError, OSError, UnicodeDecodeError ): path = ( - subprocess.check_output([ + subprocess + .check_output([ os.path.join( root, "Microsoft Visual Studio", "Installer", "vswhere.exe" ), diff --git a/distutils/compilers/C/tests/test_base.py b/distutils/compilers/C/tests/test_base.py index a762e2b6..64a17364 100644 --- a/distutils/compilers/C/tests/test_base.py +++ b/distutils/compilers/C/tests/test_base.py @@ -18,7 +18,8 @@ def c_file(tmp_path): all_headers = gen_headers + plat_headers headers = '\n'.join(f'#include <{header}>\n' for header in all_headers) payload = ( - textwrap.dedent( + textwrap + .dedent( """ #headers void PyInit_foo(void) {}