Skip to content

Comments

Update pre-commit hooks and versions for clang-format, black, and isort#3059

Merged
awni merged 3 commits intoml-explore:mainfrom
NripeshN:i7
Jan 26, 2026
Merged

Update pre-commit hooks and versions for clang-format, black, and isort#3059
awni merged 3 commits intoml-explore:mainfrom
NripeshN:i7

Conversation

@NripeshN
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 24, 2026 17:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-hooks repository section (which only had check-yaml enabled)
  • 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.

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@awni
Copy link
Member

awni commented Jan 26, 2026

Mind rebasing and then we can run the tests?

@awni
Copy link
Member

awni commented Jan 26, 2026

I might recommend starting from a fresh branch and then:

  1. Applying the version bump to the linters
  2. Run the linters again

Rather than trying to patch the format changes.

@NripeshN
Copy link
Contributor Author

I might recommend starting from a fresh branch and then:

  1. Applying the version bump to the linters
  2. Run the linters again

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😅.

@NripeshN NripeshN requested a review from awni January 26, 2026 01:11
@awni awni merged commit b6aa03e into ml-explore:main Jan 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants