Created
March 31, 2025 04:16
-
-
Save gavxin/15e35935a220674363b31d2379345aea to your computer and use it in GitHub Desktop.
pre-commit black for other file type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solution: just add `types_or: [file]` | |
``` | |
- repo: https://github.com/psf/black | |
rev: 25.1.0 | |
hooks: | |
- id: black | |
name: black for your file type | |
types_or: [file] | |
files: \.your_file_type$ | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment