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

Not offering autocomplete inside list #1302

Closed
tombohub opened this issue May 17, 2021 · 2 comments
Closed

Not offering autocomplete inside list #1302

tombohub opened this issue May 17, 2021 · 2 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@tombohub
Copy link

tombohub commented May 17, 2021

Environment data

pylance - v2021.5.2

  • Language Server version: v2021.5.2
  • OS and version: Win10, WSL1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8 Miniconda, using .venv

Expected behaviour

To offer dataclass attributes autocomplete inside list

Actual behaviour

Not offering autocomplete inside list

Logs

No logs

Code Snippet / Additional information

GmGs2Gp

NNaV0wJ

# self._prices : PricesSelectResult

@dataclass
class PricesResultColumns:
    timestamp       : str = PricesDataFields.timestamp
    symbol          : str = PricesDataFields.symbol
    open            : str = PricesDataFields.open
    high            : str = PricesDataFields.high
    low             : str = PricesDataFields.low
    close           : str = PricesDataFields.close
    volume          : str = PricesDataFields.volume
    security_type   : str = SecuritiesDataFields.security_type

@dataclass(frozen=True)
class PricesSelectResult:
    data: pd.DataFrame
    c: PricesResultColumns = PricesResultColumns()
@judej judej added bug Something isn't working needs investigation Could be an issue - needs investigation labels May 18, 2021
@github-actions github-actions bot removed the triage label May 18, 2021
@jakebailey
Copy link
Member

jakebailey commented Sep 1, 2021

This feels like sort of parser recovery bug. Note the highlighting for the variables is lost once the expression ends in a .:

image

image

Without even using dataclasses:

image

@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Oct 20, 2021
@bschnurr
Copy link
Member

This issue has been fixed in version 2021.10.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#2021102-20-october-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants