Skip to content

Commit bd024db

Browse files
committed
Adjust classifier return type annotation
Thanks @asottile! https://youtu.be/_7EXU9cjBkg
1 parent d94e4a9 commit bd024db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flake8_annotations/checker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def _return_error_classifier(
279279
is_class_method: bool,
280280
class_decorator_type: enums.ClassDecoratorType,
281281
function_type: enums.FunctionType,
282-
) -> error_codes.Error:
282+
) -> t.Type[error_codes.Error]:
283283
"""Classify return type annotation error."""
284284
# Decorated class methods (@classmethod, @staticmethod) have a higher priority than the rest
285285
if is_class_method:
@@ -304,7 +304,7 @@ def _argument_error_classifier(
304304
is_first_arg: bool,
305305
class_decorator_type: enums.ClassDecoratorType,
306306
annotation_type: enums.AnnotationType,
307-
) -> error_codes.Error:
307+
) -> t.Type[error_codes.Error]:
308308
"""Classify argument type annotation error."""
309309
# Check for regular class methods and @classmethod, @staticmethod is deferred to final check
310310
if is_class_method:

0 commit comments

Comments
 (0)