From e2e0983edff41c8b5d3166a7729e19f0f29fa3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Wed, 25 Dec 2024 22:05:21 +0100 Subject: [PATCH] ci: Remove annotation from enum values to satisfy mypy --- src/_griffe/enumerations.py | 92 ++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/_griffe/enumerations.py b/src/_griffe/enumerations.py index 5db44f43..3a36b3b1 100644 --- a/src/_griffe/enumerations.py +++ b/src/_griffe/enumerations.py @@ -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.""" @@ -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""" @@ -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: