Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Expose named tuple member in completions #343

Closed
MikhailArkhipov opened this issue Nov 4, 2018 · 5 comments
Closed

Expose named tuple member in completions #343

MikhailArkhipov opened this issue Nov 4, 2018 · 5 comments

Comments

@MikhailArkhipov
Copy link

from collections import namedtuple
nt = namedtuple('Point', ['x', 'y'])
pt = nt(1, 2)

pt. should show x and y.

@MikhailArkhipov
Copy link
Author

#546 supports named tuple from typing.

@jakebailey
Copy link
Member

This example doesn't show x and y in the completion after the ., though.

image

image

Seems to show tuple, not a named tuple.

@jakebailey jakebailey reopened this Feb 9, 2019
@MikhailArkhipov
Copy link
Author

I meant NamedTuple from typing should work.

@Rackme
Copy link

Rackme commented Mar 17, 2021

It seems I'm able to do it with official Microsoft Python plugin :

screenshot_2576

@judej
Copy link

judej commented Apr 13, 2022

Thank you for the report. This project is no longer active. If you are using the Python language server in VSCode, the language server you are using is Pylance and please the http://github.com/microsoft/pylance-release to report issues.

If you are using Visual Studio, then, please use http://github.com/microsoft/PTVS to report issues.

thank you

@judej judej closed this as completed Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants