Update pre-commit hooks and versions for clang-format, black, and isort#3059
Update pre-commit hooks and versions for clang-format, black, and isort#3059awni merged 3 commits intoml-explore:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates pre-commit hook versions for clang-format, black, and isort, which triggered automatic formatting changes across the codebase. The removed pre-commit-hooks repository contained only a check-yaml hook and commented-out hooks.
Changes:
- Updated clang-format version from v19.1.7 to v21.1.8
- Updated black version from 25.1.0 to 26.1.0
- Updated isort version from 6.0.0 to 7.0.0
- Removed the
pre-commit-hooksrepository section (which only hadcheck-yamlenabled) - Applied automatic formatting changes throughout C++ and Metal shader code
Reviewed changes
Copilot reviewed 28 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.pre-commit-config.yaml |
Updated tool versions and removed pre-commit-hooks repository |
tests/linalg_tests.cpp |
Reformatted multi-line function calls for better alignment |
python/src/ops.cpp |
Reformatted nanobind signature strings across multiple lines |
mlx/distributed/ring/ring.cpp |
Reformatted nested function calls and lambda expressions |
mlx/distributed/jaccl/jaccl.cpp |
Reformatted TCPSocket::connect call |
mlx/backend/metal/matmul.cpp |
Reformatted struct initializers to be more compact |
mlx/backend/metal/kernels/steel/gemm/mma.h |
Reformatted function parameter alignment |
mlx/backend/metal/kernels/steel/gemm/kernels/*.h |
Added spacing in template expressions (WM*WN → WM * WN) |
mlx/backend/metal/kernels/gemv_masked.h |
Added spacing in template expressions |
mlx/backend/metal/kernels/gemv.metal |
Added spacing in template expressions |
mlx/backend/metal/kernels/conv.metal |
Reformatted macro definitions for better readability |
mlx/backend/cuda/unary/unary.cuh |
Reformatted error message formatting |
mlx/backend/cuda/sort.cu |
Reformatted CUB library function calls |
mlx/backend/cuda/scan.cu |
Reformatted error message formatting |
mlx/backend/cuda/lru_cache.h |
Reformatted error message formatting |
mlx/backend/cuda/jit_module.cpp |
Reformatted error message formatting |
mlx/backend/cuda/indexing.cpp |
Reformatted fmt::format calls |
mlx/backend/cuda/gemms/cublas_gemm.cpp |
Reformatted error message formatting |
mlx/backend/cuda/event.cu |
Reformatted constructor initializer list |
mlx/backend/cuda/device.cpp |
Reformatted error message formatting |
mlx/backend/cuda/cutlass_utils.cuh |
Reformatted error message formatting |
mlx/backend/cuda/cudnn_utils.h |
Reformatted error message and tensor creation |
mlx/backend/cuda/cublas_utils.h |
Reformatted error message formatting |
mlx/backend/cuda/compiled.cpp |
Reformatted fmt::format calls |
mlx/backend/cuda/binary_two.cu |
Reformatted error message formatting |
mlx/backend/cuda/binary/binary.cuh |
Reformatted error message formatting |
mlx/backend/cpu/jit_compiler.cpp |
Reformatted JitCompiler::exec calls |
mlx/backend/cpu/compiled.cpp |
Reformatted JitCompiler calls and error messages |
mlx/array.h |
Reformatted constructor initializer list |
mlx/array.cpp |
Reformatted constructor initializer lists |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Mind rebasing and then we can run the tests? |
|
I might recommend starting from a fresh branch and then:
Rather than trying to patch the format changes. |
Ah I usually take the lazier approach, copy the conflicting files from main and paste it into my branch manually and run pre-commit😅. |
No description provided.