Skip to content

Commit

Permalink
Remove unused Self annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Dec 21, 2024
1 parent 1f7e1a3 commit e7224c6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mypy_boto3_builder/import_helpers/import_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/import_helpers/import_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/structures/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/structures/waiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/type_annotations/external_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
6 changes: 3 additions & 3 deletions mypy_boto3_builder/type_annotations/fake_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/type_annotations/type_literal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion mypy_boto3_builder/type_annotations/type_typed_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
"""
Expand Down

0 comments on commit e7224c6

Please sign in to comment.