Skip to content

with soft_assertions(): Object of type "Generator[None, None, None]" cannot be used with "with" (VSCode Pylance error) #153

@dc-avasilev

Description

@dc-avasilev
Object of type "Generator[None, None, None]" cannot be used with "with" because it does not correctly implement __enter__
  Attribute "__enter__" is unknown Pylance[reportGeneralTypeIssues](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportGeneralTypeIssues)
Object of type "Generator[None, None, None]" cannot be used with "with" because it does not correctly implement __exit__
  Attribute "__exit__" is unknown Pylance[reportGeneralTypeIssues](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportGeneralTypeIssues)

can you fix it plz?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions