Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to stubs generated from docstrings #6368

Merged
merged 4 commits into from Feb 24, 2019

Conversation

@wiktorn
Copy link
Contributor

commented Feb 9, 2019

Few improvements/bugfixes for stub generation from docstrings:

  1. Do not generate stubs with improper type names. For now it's just regex check
  2. Only generate stubs for methods that have unique argument names
  3. Fix missing defaults in stubs generated from docstrings

wiktorn added some commits Feb 9, 2019

@wiktorn

This comment has been minimized.

Copy link
Contributor Author

commented Feb 9, 2019

What I'm missing right now in stubgen is infrastructure to emit warnings. Should I just print it on stderr?

@msullivan

This comment has been minimized.

Copy link
Collaborator

commented Feb 15, 2019

Just printing on stderr should be fine for stubgen for now

@gvanrossum
Copy link
Member

left a comment

Basically LG, I have a few style nits.

mypy/stubdoc.py Outdated Show resolved Hide resolved
mypy/stubdoc.py Outdated Show resolved Hide resolved
mypy/stubdoc.py Outdated Show resolved Hide resolved
mypy/test/teststubgen.py Show resolved Hide resolved
@gvanrossum
Copy link
Member

left a comment

Great! Merging now...

@gvanrossum gvanrossum merged commit 45267aa into python:master Feb 24, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.