JelleZijlstra / autotyping

Automatically add simple type annotations to your code
238 stars 20 forks source link

add pre-commit support. #76

Closed exitflynn closed 2 months ago

exitflynn commented 2 months ago

Adds pre-commit support for the project. I've felt hooks for --safe and --aggressive should cover most use-cases but I'll be happy to include others if that appears better.

Closes #75.

JelleZijlstra commented 2 months ago

Is there no way to let the pre-commit hook take whatever arguments autotyping itself accepts? Doesn't seem ideal to have to hardcode specific arguments.

exitflynn commented 2 months ago

yep, we can do that! ^

exitflynn commented 2 months ago

hey @JelleZijlstra, I can't seem to reproduce the failing CI error at my end, would you have any insights why this could be happening?

JelleZijlstra commented 2 months ago

I'm not entirely sure; it's possible I need to cut a new release of pyanalyze. I'll look into it.