a-recknagel / stenotype

Support for shorthand type annotations.
MIT License
3 stars 2 forks source link

black pre-commit hook #19

Closed a-recknagel closed 4 years ago

a-recknagel commented 5 years ago

github supports pre-commit hooks, and black offers an API to be nicely pluggable for them. I haven't dared to touch them yet but it might be nice to have.

a-recknagel commented 5 years ago

I learned by now that git hooks are not a github feature, it's part of git itself. I'll try to work on one that will run the usual suspects: black, pytest (unit only), and mypy. All the other parts of the CI (building the package, building the docs, coverage, bandit, and security) are more stable, would take too much time, or create annoying artifacts.

a-recknagel commented 5 years ago

I researched pre-commit a little, and it might not be a good fit for what I'd like to happen. A valid solution might just consist of writing a shell script that gets dropped into stenotype/scripts or something and asking people to copy it to .git/hooks/pre-commit in the CONTRIBUTING guide.

a-recknagel commented 4 years ago

Closing this because I tried and didn't like it.