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

branch
eric7
changeset 8312
800c432b34c8
parent 8268
6b8128e0c9d1
child 8773
3dd81b827455
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing some enums for function type annotations.
8 """
9
10 #
11 # adapted from flake8-annotations v2.6.2
12 #
13
14 import enum
15
16
17 class FunctionType(enum.Enum):
18 """
19 Class representing the various function types.
20 """
21 PUBLIC = enum.auto()
22 PROTECTED = enum.auto() # Leading single underscore
23 PRIVATE = enum.auto() # Leading double underscore
24 SPECIAL = enum.auto() # Leading & trailing double underscore
25
26
27 class ClassDecoratorType(enum.Enum):
28 """
29 Class representing the various class method decorators.
30 """
31 CLASSMETHOD = enum.auto()
32 STATICMETHOD = enum.auto()
33
34
35 class AnnotationType(enum.Enum):
36 """
37 Class representing the kind of missing type annotation.
38 """
39 POSONLYARGS = enum.auto()
40 ARGS = enum.auto()
41 VARARG = enum.auto()
42 KWONLYARGS = enum.auto()
43 KWARG = enum.auto()
44 RETURN = enum.auto()

eric ide

mercurial