dropbox / pyannotate

Auto-generate PEP-484 annotations
Apache License 2.0
1.42k stars 59 forks source link

[WIP] Add a fixer to get signature data from a command #101

Open chadrik opened 4 years ago

chadrik commented 4 years ago

Throwing this up here to see if it sticks. I still have more testing to do, but I'd like to find out if I'm headed in the right direction or not.

It can be used like this:

dmypy run -- --follow-imports=error pyannotate_tools
pyannotate pyannotate_tools -c "dmypy suggest --json {filename}:{lineno}" --type-info=""

The idea is that you can enable both fixers -- json and command -- and if the json fixer doesn't provide a type annotation, then the command fixer will run and take a shot at it. Both fixers will bail if there is already an annotation. The order is determined by the run_order class variable.

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.