Skip to content

Commit c7a9fc2

Browse files
j-t-1OpenNingia
authored andcommitted
MAINT: Remove ignoring of Ruff rule UP035 (py-pdf#3417)
UP035: checks for uses of deprecated imports based on the minimum supported Python version.
1 parent 1c8af99 commit c7a9fc2

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pypdf/_writer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
IO,
4444
Any,
4545
Callable,
46-
List,
4746
Optional,
4847
Union,
4948
cast,
@@ -3093,7 +3092,7 @@ def _insert_filtered_annotations(
30933092
) -> list[Destination]:
30943093
outlist = ArrayObject()
30953094
if isinstance(annots, IndirectObject):
3096-
annots = cast("List[Any]", annots.get_object())
3095+
annots = cast("list[Any]", annots.get_object())
30973096
if annots is None:
30983097
return outlist
30993098
if not isinstance(annots, list):

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ ignore = [
200200
"TRY301", # Abstract `raise` to an inner function
201201
"UP006", # Non-PEP 585 annotation. As long as we are not on Python 3.11+
202202
"UP007", # Non-PEP 604 annotation. As long as we are not on Python 3.11+
203-
"UP035", # PEP 585. As long as we are not on Python 3.9+
204203
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` - PEP 604. While not on Python 3.10+
205204
]
206205

0 commit comments

Comments
 (0)