JelleZijlstra / autotyping

Automatically add simple type annotations to your code
215 stars 18 forks source link

Add flag that turns safe reformats on by default #36

Closed JelleZijlstra closed 1 year ago

JelleZijlstra commented 1 year ago

I'd like to add a flag that turns on all the safe reformats at once, so you don't have to invoke autotyping with --none-return --scalar-return --annotate-magics --so-many-flags.

I'm just not sure what to name it yet, suggestions welcome. (cc @twoertwein in case you have ideas :)

twoertwein commented 1 year ago

Running all stable options by default as mentioned in https://github.com/JelleZijlstra/autotyping/issues/9#issuecomment-871144551 sounds good to me (but it would change the behavior of autotyping and you would need to add options to disable stable options).

twoertwein commented 1 year ago

(My long-term plan is to also enable the un-safe options (--int-param and so on) for pandas because pyright assumes that in the absence of type annotations. Might obviously need more time to enable that - in many cases int/float/str are not the only valid types.)