--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsEnums.py Fri Apr 16 18:03:43 2021 +0200 @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2021 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing some enums for function type annotations. +""" + +# +# adapted from flake8-annotations v2.6.2 +# + +from enum import Enum, auto + + +class FunctionType(Enum): + """ + Class representing the various function types. + """ + PUBLIC = auto() + PROTECTED = auto() # Leading single underscore + PRIVATE = auto() # Leading double underscore + SPECIAL = auto() # Leading & trailing double underscore + + +class ClassDecoratorType(Enum): + """ + Class representing the various class method decorators. + """ + CLASSMETHOD = auto() + STATICMETHOD = auto() + + +class AnnotationType(Enum): + """ + Class representing the kind of missing type annotation. + """ + POSONLYARGS = auto() + ARGS = auto() + VARARG = auto() + KWONLYARGS = auto() + KWARG = auto() + RETURN = auto()