Skip to content

DEV: replace pre-commit with lefthook+Pixi #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 1, 2025

Conversation

lucascolley
Copy link
Member

closes gh-194

@lucascolley lucascolley changed the title DEV: replace pre-commit with lefthook+Pixi DEV: replace pre-commit with lefthook+Pixi+dprint Jun 30, 2025
@lucascolley lucascolley changed the title DEV: replace pre-commit with lefthook+Pixi+dprint DEV: replace pre-commit with lefthook+Pixi Jul 1, 2025
@lucascolley lucascolley force-pushed the lefthook branch 3 times, most recently from f221d64 to 355528b Compare July 1, 2025 00:42
@lucascolley
Copy link
Member Author

src/array_api_extra/_lib/_utils/_compat.pyi: error: Duplicate module named "array_api_extra._lib._utils._compat" (also at "src/array_api_extra/_lib/_utils/_compat.py")
src/array_api_extra/_lib/_utils/_compat.pyi: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
src/array_api_extra/_lib/_utils/_compat.pyi: note: Common resolutions include: a) using `--exclude` to avoid checking one of them, b) adding `__init__.py` somewhere, c) using `--explicit-package-bases` or adjusting MYPYPATH

@jorenham how can I deal with this odd error from mypy?

@lucascolley
Copy link
Member Author

fixed by not providing mypy with staged files

@lucascolley lucascolley marked this pull request as ready for review July 1, 2025 10:19
@lucascolley
Copy link
Member Author

hat tip @jorenham @KotlinIsland @pavelzw this is a nice improvement, thanks for pointing me in this direction!

@lucascolley lucascolley merged commit 83897e5 into data-apis:main Jul 1, 2025
10 checks passed
@lucascolley lucascolley added this to the 0.8.1 milestone Jul 1, 2025
@lucascolley
Copy link
Member Author

@crusaderky FYI, I don't know if you used the previous pre-commit hook, but if so you can rm -rf .git/hooks && pixi run hooks to get it set back up

@lucascolley lucascolley deleted the lefthook branch July 1, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEV: use pixi for pre-commit
1 participant