Skip to content

Commit

Permalink
ci: Remove annotation from enum values to satisfy mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Dec 25, 2024
1 parent 2780854 commit e2e0983
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions src/_griffe/enumerations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
class LogLevel(str, Enum):
"""Enumeration of available log levels."""

trace: str = "trace"
trace = "trace"
"""The TRACE log level."""
debug: str = "debug"
debug = "debug"
"""The DEBUG log level."""
info: str = "info"
info = "info"
"""The INFO log level."""
success: str = "success"
success = "success"
"""The SUCCESS log level."""
warning: str = "warning"
warning = "warning"
"""The WARNING log level."""
error: str = "error"
error = "error"
"""The ERROR log level."""
critical: str = "critical"
critical = "critical"
"""The CRITICAL log level."""


Expand Down Expand Up @@ -62,72 +62,72 @@ class DocstringSectionKind(str, Enum):
class ParameterKind(str, Enum):
"""Enumeration of the different parameter kinds."""

positional_only: str = "positional-only"
positional_only = "positional-only"
"""Positional-only parameter."""
positional_or_keyword: str = "positional or keyword"
positional_or_keyword = "positional or keyword"
"""Positional or keyword parameter."""
var_positional: str = "variadic positional"
var_positional = "variadic positional"
"""Variadic positional parameter."""
keyword_only: str = "keyword-only"
keyword_only = "keyword-only"
"""Keyword-only parameter."""
var_keyword: str = "variadic keyword"
var_keyword = "variadic keyword"
"""Variadic keyword parameter."""


class Kind(str, Enum):
"""Enumeration of the different object kinds."""

MODULE: str = "module"
MODULE = "module"
"""Modules."""
CLASS: str = "class"
CLASS = "class"
"""Classes."""
FUNCTION: str = "function"
FUNCTION = "function"
"""Functions and methods."""
ATTRIBUTE: str = "attribute"
ATTRIBUTE = "attribute"
"""Attributes and properties."""
ALIAS: str = "alias"
ALIAS = "alias"
"""Aliases (imported objects)."""


class ExplanationStyle(str, Enum):
"""Enumeration of the possible styles for explanations."""

ONE_LINE: str = "oneline"
ONE_LINE = "oneline"
"""Explanations on one-line."""
VERBOSE: str = "verbose"
VERBOSE = "verbose"
"""Explanations on multiple lines."""
MARKDOWN: str = "markdown"
MARKDOWN = "markdown"
"""Explanations in Markdown, adapted to changelogs."""
GITHUB: str = "github"
GITHUB = "github"
"""Explanation as GitHub workflow commands warnings, adapted to CI."""


class BreakageKind(str, Enum):
"""Enumeration of the possible API breakages."""

PARAMETER_MOVED: str = "Positional parameter was moved"
PARAMETER_MOVED = "Positional parameter was moved"
"""Positional parameter was moved"""
PARAMETER_REMOVED: str = "Parameter was removed"
PARAMETER_REMOVED = "Parameter was removed"
"""Parameter was removed"""
PARAMETER_CHANGED_KIND: str = "Parameter kind was changed"
PARAMETER_CHANGED_KIND = "Parameter kind was changed"
"""Parameter kind was changed"""
PARAMETER_CHANGED_DEFAULT: str = "Parameter default was changed"
PARAMETER_CHANGED_DEFAULT = "Parameter default was changed"
"""Parameter default was changed"""
PARAMETER_CHANGED_REQUIRED: str = "Parameter is now required"
PARAMETER_CHANGED_REQUIRED = "Parameter is now required"
"""Parameter is now required"""
PARAMETER_ADDED_REQUIRED: str = "Parameter was added as required"
PARAMETER_ADDED_REQUIRED = "Parameter was added as required"
"""Parameter was added as required"""
RETURN_CHANGED_TYPE: str = "Return types are incompatible"
RETURN_CHANGED_TYPE = "Return types are incompatible"
"""Return types are incompatible"""
OBJECT_REMOVED: str = "Public object was removed"
OBJECT_REMOVED = "Public object was removed"
"""Public object was removed"""
OBJECT_CHANGED_KIND: str = "Public object points to a different kind of object"
OBJECT_CHANGED_KIND = "Public object points to a different kind of object"
"""Public object points to a different kind of object"""
ATTRIBUTE_CHANGED_TYPE: str = "Attribute types are incompatible"
ATTRIBUTE_CHANGED_TYPE = "Attribute types are incompatible"
"""Attribute types are incompatible"""
ATTRIBUTE_CHANGED_VALUE: str = "Attribute value was changed"
ATTRIBUTE_CHANGED_VALUE = "Attribute value was changed"
"""Attribute value was changed"""
CLASS_REMOVED_BASE: str = "Base class was removed"
CLASS_REMOVED_BASE = "Base class was removed"
"""Base class was removed"""


Expand All @@ -151,31 +151,31 @@ class Parser(str, Enum):
class ObjectKind(str, Enum):
"""Enumeration of the different runtime object kinds."""

MODULE: str = "module"
MODULE = "module"
"""Modules."""
CLASS: str = "class"
CLASS = "class"
"""Classes."""
STATICMETHOD: str = "staticmethod"
STATICMETHOD = "staticmethod"
"""Static methods."""
CLASSMETHOD: str = "classmethod"
CLASSMETHOD = "classmethod"
"""Class methods."""
METHOD_DESCRIPTOR: str = "method_descriptor"
METHOD_DESCRIPTOR = "method_descriptor"
"""Method descriptors."""
METHOD: str = "method"
METHOD = "method"
"""Methods."""
BUILTIN_METHOD: str = "builtin_method"
BUILTIN_METHOD = "builtin_method"
"""Built-in methods."""
COROUTINE: str = "coroutine"
COROUTINE = "coroutine"
"""Coroutines"""
FUNCTION: str = "function"
FUNCTION = "function"
"""Functions."""
BUILTIN_FUNCTION: str = "builtin_function"
BUILTIN_FUNCTION = "builtin_function"
"""Built-in functions."""
CACHED_PROPERTY: str = "cached_property"
CACHED_PROPERTY = "cached_property"
"""Cached properties."""
PROPERTY: str = "property"
PROPERTY = "property"
"""Properties."""
ATTRIBUTE: str = "attribute"
ATTRIBUTE = "attribute"
"""Attributes."""

def __str__(self) -> str:
Expand Down

0 comments on commit e2e0983

Please sign in to comment.