Skip to content

'None' is marked as unknown variable when used as return type #3117

@malmaud

Description

@malmaud

With Python extension 2018.9.2 on VSCode 1.28.2 on OS X 10.14:

def f() -> None:
    pass
{
	"owner": "_generated_diagnostic_collection_name_#1",
	"code": "used-before-assignment",
	"severity": 4,
	"message": "unknown variable 'None'",
	"source": "Python (analysis)",
	"startLineNumber": 1,
	"startColumn": 12,
	"endLineNumber": 1,
	"endColumn": 16
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions