indrajithi / tiny-web-crawler

A simple and easy to use web crawler for Python
MIT License
55 stars 11 forks source link

Add mypy to pre-commit hooks #20

Closed Mews closed 1 week ago

Mews commented 1 week ago

I noticed this when working in #19 Type checking with mypy is done in the ci, but its not included in the pre-commit hooks. Should probably be added.

indrajithi commented 1 week ago

Good idea. I was also trying to make the test run before pushing. Could you add that also in this issue.

Mews commented 1 week ago

Yeah I can submit a pr for this if you want :)

indrajithi commented 1 week ago

@Mews Were you able to see if you can make the test run before we push? I did try for sometime, couldn't get it working.

Mews commented 1 week ago

I tried doing a few commits on my machine and the tests ran 👍 Aren't they running on your machine?

indrajithi commented 1 week ago

For commits the test runs in my machine as well. That is not what I was saying. Since running test will be expensive, I was thinking to add that hook before we push. When we commit it should not run tests. Sometimes we might commit quite frequently and it might become a pain to run the test every time. It would be best if we can run the tests automatically before push.

Mews commented 1 week ago

Yes, you can do that :) I made a new pr with the changes to .pre-commit-config.yaml, but, for it to work, you also have to install the push hook through this command: pre-commit install --hook-type pre-push