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

Inline type hinting #542

Closed
blueyed opened this issue Feb 4, 2015 · 8 comments
Closed

Inline type hinting #542

blueyed opened this issue Feb 4, 2015 · 8 comments
Labels

Comments

@blueyed
Copy link
Contributor

blueyed commented Feb 4, 2015

It would be nice to allow for type hinting within a function, above an assignment.

(via #421 (comment))

@davidhalter
Copy link
Owner

Can you elaborate?

@blueyed
Copy link
Contributor Author

blueyed commented Feb 7, 2015

I would like to use something like this:

# :type client: Client
client = get_some_client()

This could be useful when jedi does not get it correctly (as with #543).

@davidhalter
Copy link
Owner

Hmm, what ways of using comments as type hinting are there already (in PyCharm, PyDev, etc)?

@blueyed
Copy link
Contributor Author

blueyed commented Mar 5, 2015

I don't know.

@blueyed
Copy link
Contributor Author

blueyed commented Mar 15, 2015

Here's how PyDev does it: http://pydev.org/manual_adv_type_hints.html

@dset0x
Copy link

dset0x commented May 29, 2015

PyCharm has a similar feature (linking purely for inspiration) : https://www.jetbrains.com/pycharm/help/type-hinting-in-pycharm.html#d281633e18247

@reinhrst
Copy link
Contributor

#664 will allow PEP484-style type-hinting

@davidhalter
Copy link
Owner

I'm closing this one, because we're merging very very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants