Skip to content

Commit

Permalink
DEV: Remove ignore Ruff rule ANN202 (#3100)
Browse files Browse the repository at this point in the history
ANN202: Missing return type annotation for private function.

---------

Co-authored-by: Stefan <[email protected]>
  • Loading branch information
j-t-1 and stefan6419846 authored Feb 1, 2025
1 parent c78f68d commit 67e1781
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 7 additions & 1 deletion pypdf/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
else:
from typing_extensions import TypeAlias

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self

from .errors import (
STREAM_TRUNCATED_PREMATURELY,
DeprecationError,
Expand Down Expand Up @@ -477,6 +482,7 @@ def _human_readable_bytes(bytes: int) -> str:

# The following class has been copied from Django:
# https://github.com/django/django/blob/adae619426b6f50046b3daaa744db52989c9d6db/django/utils/functional.py#L51-L65
# It received some modifications to comply with our own coding standards.
#
# Original license:
#
Expand Down Expand Up @@ -521,7 +527,7 @@ def __init__(self, method=None) -> None: # type: ignore # noqa: ANN001
def __get__(self, instance, cls=None) -> Any: # type: ignore # noqa: ANN001
return self.fget(cls)

def getter(self, method): # type: ignore # noqa: ANN001, ANN202
def getter(self, method) -> Self: # type: ignore # noqa: ANN001
self.fget = method
return self

Expand Down
6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

0 comments on commit 67e1781

Please sign in to comment.