eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsEnums.py

changeset 8265
0090cfa83159
parent 8244
ed8cb108b27b
child 8268
6b8128e0c9d1
equal deleted inserted replaced
8264:f95dde35d0ab 8265:0090cfa83159
9 9
10 # 10 #
11 # adapted from flake8-annotations v2.6.2 11 # adapted from flake8-annotations v2.6.2
12 # 12 #
13 13
14 from enum import Enum, auto 14 import enum
15 15
16 16 class FunctionType(enum.Enum):
17 class FunctionType(Enum):
18 """ 17 """
19 Class representing the various function types. 18 Class representing the various function types.
20 """ 19 """
21 PUBLIC = auto() 20 PUBLIC = enum.auto()
22 PROTECTED = auto() # Leading single underscore 21 PROTECTED = enum.auto() # Leading single underscore
23 PRIVATE = auto() # Leading double underscore 22 PRIVATE = enum.auto() # Leading double underscore
24 SPECIAL = auto() # Leading & trailing double underscore 23 SPECIAL = enum.auto() # Leading & trailing double underscore
25 24
26 25
27 class ClassDecoratorType(Enum): 26 class ClassDecoratorType(enum.Enum):
28 """ 27 """
29 Class representing the various class method decorators. 28 Class representing the various class method decorators.
30 """ 29 """
31 CLASSMETHOD = auto() 30 CLASSMETHOD = enum.auto()
32 STATICMETHOD = auto() 31 STATICMETHOD = enum.auto()
33 32
34 33
35 class AnnotationType(Enum): 34 class AnnotationType(enum.Enum):
36 """ 35 """
37 Class representing the kind of missing type annotation. 36 Class representing the kind of missing type annotation.
38 """ 37 """
39 POSONLYARGS = auto() 38 POSONLYARGS = enum.auto()
40 ARGS = auto() 39 ARGS = enum.auto()
41 VARARG = auto() 40 VARARG = enum.auto()
42 KWONLYARGS = auto() 41 KWONLYARGS = enum.auto()
43 KWARG = auto() 42 KWARG = enum.auto()
44 RETURN = auto() 43 RETURN = enum.auto()

eric ide

mercurial