Skip to content
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

More general .pre-commit-hooks.yaml for Jupyter Notebooks #297

Open
jamesbraza opened this issue Oct 23, 2023 · 1 comment · May be fixed by #298
Open

More general .pre-commit-hooks.yaml for Jupyter Notebooks #297

jamesbraza opened this issue Oct 23, 2023 · 1 comment · May be fixed by #298

Comments

@jamesbraza
Copy link

Description

black-jupyter integrates Jupyter notebooks into the hook's targets.

https://github.com/adamchainz/blacken-docs/blob/1.16.0/.pre-commit-hooks.yaml#L6 should be using types_or over files:

-    files: '\.(rst|md|markdown|py|tex)$'
+    # text encompasses rst, md, tex
+    types_or: [rst, markdown, tex, python, pyi, jupyter]

To discover what to input to types_or, use https://github.com/pre-commit/identify:

> identify-cli hi.rst
["file", "non-executable", "rst", "text"]
@jamesbraza
Copy link
Author

Related: #240

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 a pull request may close this issue.

1 participant