Closed tekktrik closed 2 years ago
Whoops, I forgot to add pre-commit
as a dependency!
I pinned pre-commit with compatibility release notation to 2.20 (latest), but it could almost certainly be relaxed if there are any use cases requiring it.
It looks like even pre-commit run --all-files
alone wasn't running the pytest
hook, so I patched that by adding --hook-stage manual
to trigger it as well.
Here are the failures that I see so far:
pydocstyle
for missing argument descriptions. If you want to add those directly to this PR, it's open for changes to maintainers.doctest
error but I'm having a harder time understanding where the error is there.I fixed the doctest
issue with that fix as well, but I guess one of tests in the pytest
suite requires mypy
and so that one failed. Not sure if that means you want to keep mypy
as a dev dependency, or whether the test should be changed. Let me know!
I fixed the
doctest
issue with that fix as well, but I guess one of tests in thepytest
suite requiresmypy
and so that one failed. Not sure if that means you want to keepmypy
as a dev dependency, or whether the test should be changed. Let me know!
You are fast! Yeah, I forgot about that mypy test: let's just add that mypy dev dependency back in for now. Thank you!
- There are two errors from
pydocstyle
for missing argument descriptions. If you want to add those directly to this PR, it's open for changes to maintainers.
It's a little odd that this exclusion in setup.cfg doesn't skip it; I think it has to do with pre-commit passing filenames directly. Anyway! Yup, I'll just fix up the two errors instead of thinking about it.
I should be able to mimic that exclusion in the hook, I think, if you want to go that route as well.
Yup, tested locally, I can exlude it by passing --match='(?!datetimelib).*(?<!_test).py$'
as an arg to the hook.
Yup, tested locally, I can exlude it by passing
--match='(?!datetimelib).*(?<!_test).py$'
as an arg to the hook.
Thanks for investigating! I just pushed something to resolve the two errors in datetimelib.py - a reasonable thing to do anyway.
Checks look good, so I've merged. Thank you -- I'm pretty excited about the other hooks we can trivially add now!
I don't think I should have to, but adding the "hacktoberfest-accepted" label to make extra sure it counts :smile:
Thanks so much! I always love working on repo infrastructure. Feel free to reach out if anything like that comes up!
Resolves #121 by swapping
precommit.py
for the standard.pre-commit-config.yaml
file. I tried my best to replicate the existing actions performed by the old file, and also tried to fix any errors that popped out. There are a few remaining from some of the hooks, so please feel free to push any fixes for them directly to this PR.Setting this as a draft for now, if everything looks good I can undraft it.
Let me know if you have any questions, or if there's anything I can explain!