From e7224c6da919cdeb8f8153e34d3b3aba2db790d2 Mon Sep 17 00:00:00 2001 From: Vlad Emelianov Date: Sat, 21 Dec 2024 14:25:18 +0300 Subject: [PATCH] Remove unused Self annotations --- mypy_boto3_builder/import_helpers/import_record.py | 2 +- mypy_boto3_builder/import_helpers/import_string.py | 2 +- mypy_boto3_builder/structures/paginator.py | 2 +- mypy_boto3_builder/structures/waiter.py | 2 +- mypy_boto3_builder/type_annotations/external_import.py | 2 +- mypy_boto3_builder/type_annotations/fake_annotation.py | 6 +++--- mypy_boto3_builder/type_annotations/type_literal.py | 2 +- mypy_boto3_builder/type_annotations/type_typed_dict.py | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mypy_boto3_builder/import_helpers/import_record.py b/mypy_boto3_builder/import_helpers/import_record.py index a41eca9b..3a01fa6c 100644 --- a/mypy_boto3_builder/import_helpers/import_record.py +++ b/mypy_boto3_builder/import_helpers/import_record.py @@ -91,7 +91,7 @@ def __eq__(self, other: object) -> bool: return str(self) == str(other) - def __gt__(self: Self, other: Self) -> bool: + def __gt__(self, other: Self) -> bool: """ Compare two import records for sorting. diff --git a/mypy_boto3_builder/import_helpers/import_string.py b/mypy_boto3_builder/import_helpers/import_string.py index af16d846..22a6c4e4 100644 --- a/mypy_boto3_builder/import_helpers/import_string.py +++ b/mypy_boto3_builder/import_helpers/import_string.py @@ -94,7 +94,7 @@ def __gt__(self, other: Self) -> bool: return self.parts > other.parts - def __add__(self: Self, other: Self | str) -> Self: + def __add__(self, other: Self | str) -> Self: """ Create a new import string by adding another import string parts to the end. """ diff --git a/mypy_boto3_builder/structures/paginator.py b/mypy_boto3_builder/structures/paginator.py index 7a48ae39..b27b30b0 100644 --- a/mypy_boto3_builder/structures/paginator.py +++ b/mypy_boto3_builder/structures/paginator.py @@ -67,7 +67,7 @@ def __eq__(self, other: object) -> bool: return self.get_sort_key() == other.get_sort_key() - def __gt__(self: Self, other: Self) -> bool: + def __gt__(self, other: Self) -> bool: """ Compare two annotations for sorting. """ diff --git a/mypy_boto3_builder/structures/waiter.py b/mypy_boto3_builder/structures/waiter.py index becb72c2..cc54eeff 100644 --- a/mypy_boto3_builder/structures/waiter.py +++ b/mypy_boto3_builder/structures/waiter.py @@ -63,7 +63,7 @@ def __eq__(self, other: object) -> bool: return self.get_sort_key() == other.get_sort_key() - def __gt__(self: Self, other: Self) -> bool: + def __gt__(self, other: Self) -> bool: """ Compare two annotations for sorting. """ diff --git a/mypy_boto3_builder/type_annotations/external_import.py b/mypy_boto3_builder/type_annotations/external_import.py index 1c57c753..2cbdf7a7 100644 --- a/mypy_boto3_builder/type_annotations/external_import.py +++ b/mypy_boto3_builder/type_annotations/external_import.py @@ -112,7 +112,7 @@ def __copy__(self) -> Self: """ return self.__class__(self.source, self.name, self.alias, fallback=self.fallback) - def copy_from(self: Self, other: Self) -> None: + def copy_from(self, other: Self) -> None: """ Copy all fileds from another instance. """ diff --git a/mypy_boto3_builder/type_annotations/fake_annotation.py b/mypy_boto3_builder/type_annotations/fake_annotation.py index fa19c16d..e1bb58bc 100644 --- a/mypy_boto3_builder/type_annotations/fake_annotation.py +++ b/mypy_boto3_builder/type_annotations/fake_annotation.py @@ -35,7 +35,7 @@ def __eq__(self, other: object) -> bool: return self.get_sort_key() == other.get_sort_key() - def __gt__(self: Self, other: "FakeAnnotation") -> bool: + def __gt__(self, other: "FakeAnnotation") -> bool: """ Compare two annotations for sorting. """ @@ -100,12 +100,12 @@ def is_literal(self) -> bool: return False @abstractmethod - def __copy__(self: Self) -> Self: + def __copy__(self) -> Self: """ Create a copy of type annotation wrapper. """ - def copy(self: Self) -> Self: + def copy(self) -> Self: """ Create a copy of type annotation wrapper. """ diff --git a/mypy_boto3_builder/type_annotations/type_literal.py b/mypy_boto3_builder/type_annotations/type_literal.py index bd99b795..23525121 100644 --- a/mypy_boto3_builder/type_annotations/type_literal.py +++ b/mypy_boto3_builder/type_annotations/type_literal.py @@ -94,7 +94,7 @@ def add_child(self, child: FakeAnnotation) -> None: """ raise TypeAnnotationError("Use add_literal_child function.") - def is_same(self: Self, other: Self) -> bool: + def is_same(self, other: Self) -> bool: """ Check if literals have the same children. """ diff --git a/mypy_boto3_builder/type_annotations/type_typed_dict.py b/mypy_boto3_builder/type_annotations/type_typed_dict.py index 9fc155de..2135658f 100644 --- a/mypy_boto3_builder/type_annotations/type_typed_dict.py +++ b/mypy_boto3_builder/type_annotations/type_typed_dict.py @@ -227,7 +227,7 @@ def __copy__(self) -> Self: stringify=self.is_stringified(), ) - def is_same(self: Self, other: Self) -> bool: + def is_same(self, other: Self) -> bool: """ Check whether typed dict attributes are the same as `other`. """