Skip to content

Pylance does not recognize constructor params from attrs  #226

@mmiicchh

Description

@mmiicchh

Environment data

  • Language Server version: v2020.8.0
  • OS and version: macOs Mojave 10.14.6
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.8, pipenv
  • VSCode version: 1.47.3

Expected behaviour

Type checking should recognize attributes created by attrs library (PyCharm does).

Actual behaviour

Screen Shot 2020-08-10 at 2 12 47 PM

Code Snippet / Additional information

import attr
@attr.s
class Foo:
    bar: str = attr.ib()

Foo("aa")

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions