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

Sat, 17 Apr 2021 12:42:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 17 Apr 2021 12:42:28 +0200
changeset 8249
8232e8e4eeef
parent 8244
ed8cb108b27b
child 8265
0090cfa83159
permissions
-rw-r--r--

Fixed some code style issues.

# -*- 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()

eric ide

mercurial