Pre-commit docs
Thank you for jupytext! I really like that it allows for clean diffs and therefore provides basically a "Jupyter alternative" to Marimo in that sense . I was brought to jupytext via this blog post that claims that all that Marimo can do, Jupyter can do as well.
I was struggling with understanding what jupytext does as a pre-commit hook. The docs about that suggest that a similar behavior can be expected as a manual --sync, but after some digging, it turns out that it runs it together with the option --pre-commit-mode. As such, its behavior is significantly different. My suggestion would be to better describe that in the docs.
Furthermore, the docs concerning --pre-commit-mode read:
--pre-commit-mode This is a mode that is compatible with the pre-commit framework. In this mode, --sync won't use timestamp but instead will
determines the source notebook as the element of the pair that is added to the git index. An alert is raised if multiple
inconsistent representations are in the index. It also raises an alert after updating the paired files or outputs if those files
need to be added to the index. Finally, filepaths that aren't in the source format you are trying to convert from are ignored.
(default: False)Here, it is not clear to me what happens if one or two out of a notebook pair are changed (on the working tree), but none in the pair are staged (not in the Git index).
Source: jupytext/jupytext