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

Display default values in dataclass tooltip #585

Closed
cdce8p opened this issue Nov 8, 2020 · 2 comments
Closed

Display default values in dataclass tooltip #585

cdce8p opened this issue Nov 8, 2020 · 2 comments
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@cdce8p
Copy link

cdce8p commented Nov 8, 2020

Environment data

  • Language Server version: 2020.11.0
  • OS and version: macOS
  • Python version: 3.9

Expected behaviour

As with normal classes, tooltips should display default values.

Screen Shot 2020-11-08 at 14 01 51

Actual behaviour

Screen Shot 2020-11-08 at 14 02 10

Code Snippet / Additional information

from dataclasses import dataclass

class MyClass:
    def __init__(self, var: bool, var_default: bool = False):
        pass

@dataclass
class MyDataClass:
    var: bool
    var_default: bool = False
@github-actions github-actions bot added the triage label Nov 8, 2020
@cdce8p cdce8p changed the title Display default values for dataclasses Display default values in dataclass tooltip Nov 8, 2020
@erictraut
Copy link
Contributor

Thanks for the suggestion. This will be addressed in the next release.

@erictraut erictraut added enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed triage labels Nov 8, 2020
@jakebailey
Copy link
Member

This issue has been fixed in version 2020.11.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020111-11-november-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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

3 participants