Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Spurious error report: Inheriting 'Enum', which is not a class.Python(inherit-non-class) #1465

@vistatest

Description

@vistatest

Environment data

  • VS Code version: 1.37.0
  • Extension version (available under the Extensions sidebar): 2019.8.30787
  • OS and version: MacOS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: XXX
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): no jedi

Expected behaviour

Defining enum with no errors.

Actual behaviour

An error on defining enum:
Inheriting 'Enum', which is not a class.Python(inherit-non-class)

Steps to reproduce:

Define Python 3 enum, e.g.

from enum import Enum

class Location(Enum):
  LAST = 'last'
  ALL = 'all'

and see error reported in Problems
and a class name underscored with a yellowish line, hovering above class name brings an error popup

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