JelleZijlstra / autotyping

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

Add flag that turns safe reformats on by default #36

Closed JelleZijlstra closed 2 years ago

JelleZijlstra commented 2 years 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 2 years 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 2 years 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.)