Skip to content

Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813

Open
antonwolfy wants to merge 6 commits intomasterfrom
update-pre-commit-checks
Open

Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813
antonwolfy wants to merge 6 commits intomasterfrom
update-pre-commit-checks

Conversation

@antonwolfy
Copy link
Contributor

Summary

  • Migrate clang-format from pocc/pre-commit-hooks to pre-commit/mirrors-clang-format v22.1.0
  • Update .clang-format config to maintain consistent code style across versions
  • Configure pylint to properly handle C extension modules (numpy, dpctl)
  • Remove manual clang-format-12 installation from GitHub workflow
  • Reformat all C++ files with clang-format v22
  • Add reformatting commit to .git-blame-ignore-revs

Changes

Pre-commit configuration

  • Switch to pre-commit/mirrors-clang-format (v22.1.0) for better version pinning and consistency across environments
  • Add --disable=c-extension-no-member to pylint to avoid false positives on C extension objects

Code style

  • Update .clang-format: Set AfterControlStatement: Never to preserve existing brace placement style
  • Reformat all C++ source files with clang-format v22 (net -159 lines due to template parameter formatting improvements)

Pylint configuration

  • Add extension-pkg-allow-list = ["numpy"] to help pylint understand numpy better
  • Add generated-members patterns to handle dynamically created attributes on numpy types

CI/CD

  • Remove obsolete apt-get install clang-format-12 step from pre-commit workflow

@antonwolfy antonwolfy added this to the 0.20.0 release milestone Mar 11, 2026
@antonwolfy antonwolfy self-assigned this Mar 11, 2026
@github-actions
Copy link
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2813/index.html

@github-actions
Copy link
Contributor

Array API standard conformance tests for dpnp=0.20.0dev4=py313h509198e_7 ran successfully.
Passed: 1355
Failed: 2
Skipped: 16

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 81.384% (+0.2%) from 81.17%
when pulling 9e10e88 on update-pre-commit-checks
into 4b64466 on master.

@antonwolfy antonwolfy marked this pull request as ready for review March 11, 2026 14:18
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