Search code examples
pythonpython-3.xenumspycharm

Unexpected Warning using Enum Functional API - PyCharm Bug


Using the Functional API example given in documentation 8.13.12. I get the following Warning (using python 3.6). The code does work in the console but I'd rather not have warnings upon my code inspection. What am I doing wrong? And how can I get rid of the warning?

from enum import Enum
Animal = Enum('Animal', 'ANT BEE CAT DOG')

Unexpected argument(s) Possible callees: Enum.new(cls: Enum, value) object(self: object) less... (Ctrl+F1) Inspection info: Reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments (e.g. duplicate named arguments) and incorrect argument order. Decorators are analyzed, too


Solution

  • The bug was fixed in PyCharm 2020.1.