dropbox / pyannotate

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

Support for getting annotations from docstrings #103

Open chadrik opened 4 years ago

chadrik commented 4 years ago

Hi, me again. I created a tool, called doc484 much like pyannotate, for adding type comments based on docstrings. When I created my tool I was aware of pyannotate but assumed it just about generating annotations from types captured at runtime. Now that I realize it's really two separate tools, I think there are a lot of great features that could be added to pyannotate to make it a one-stop shop for generating/modifying type annotations.

doc484 is also implemented using lib2t3 and would be incredibly easy to add to pyannotate. It implies some additional features, like the ability to specify a fixer that should be considered a source of truth and should thus overwrite existing annotations if they are out of date (and dealing with the ramifications of that in a multi-fixer scenario).

Let me know what you think.

gvanrossum commented 4 years ago

I wonder if the right thing to do isn't for you to just fork pyannotate? Since my retirement from Dropbox I simply don't have the time to review pyannotate contributions any more, and I believe the mypy team at Dropbox also doesn't have that much time to invest.

chadrik commented 4 years ago

That's an interesting idea. Alternatively, I could help you maintain this project, if you were willing to take a leap of faith. I could get someone from one of the other open source projects that I contribute to to vouch for me, if it helps.

On Sat, Apr 18, 2020 at 9:42 PM Guido van Rossum notifications@github.com wrote:

I wonder if the right thing to do isn't for you to just fork pyannotate? Since my retirement from Dropbox I simply don't have the time to review pyannotate contributions any more, and I believe the mypy team at Dropbox also doesn't have that much time to invest.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dropbox/pyannotate/issues/103#issuecomment-616029683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAPOE56APDVC2XFISE4NWDRNJ6M7ANCNFSM4MLP35AQ .

gvanrossum commented 4 years ago

Well, this repo is owned by Dropbox, and I am no longer a Dropbox employee, so l cannot merge anything. Hence my suggestion to fork.

gvanrossum commented 4 years ago

Also, I've seen your contributions and I have no doubt about your skills or reliability. I suspect that Dropbox will be happy to see this project forked to get new energy and features into it!

chadrik commented 4 years ago

I'd hate to fork the project if we can get some momentum going here, and also I don't really want to be on the hook for the runtime part of the project, which I have very little interest in. My plan is to submit a series of PRs here for the issues that I created, and if they get merged then great, otherwise, I'll create a fork of the project under a new name, likely without the runtime part.

Thanks for the guidance. And for.. y'know... python :)

gvanrossum commented 4 years ago

From the resounding silence you can draw your own conclusions. I hope your fork takes flight!