Update Unused parameters in stubs/ (#9704)

* Update _Unused TypeAlias

* Update `object | None` params

* Replace unused `object` parameters with `Unused` alias
This commit is contained in:
Avasam
2023-02-22 02:52:52 -05:00
committed by GitHub
parent fbc092b4cd
commit 078c6a0958
33 changed files with 134 additions and 133 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections.abc import Callable
from html.parser import HTMLParser
from logging import Logger
@@ -68,7 +68,7 @@ class HTML2FPDF(HTMLParser):
ul_bullet_char: str = ...,
heading_sizes: Incomplete | None = None,
warn_on_tags_not_matching: bool = True,
**_: object,
**_: Unused,
): ...
def width2unit(self, length): ...
def handle_data(self, data) -> None: ...
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections import defaultdict
from logging import Logger
from typing_extensions import Final
@@ -165,7 +165,7 @@ class PDFPagesRoot(PDFObject):
class PDFExtGState(PDFObject):
def __init__(self, dict_as_str) -> None: ...
def serialize(self, obj_dict: object = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
def serialize(self, obj_dict: Unused = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
class PDFXrefAndTrailer(ContentWithoutID):
output_builder: Incomplete
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Unused
from collections import defaultdict
from collections.abc import Generator, Iterable
@@ -8,7 +8,7 @@ from .syntax import PDFArray, PDFObject, PDFString
class NumberTree(PDFObject):
nums: defaultdict[Incomplete, list[Incomplete]]
def __init__(self) -> None: ...
def serialize(self, obj_dict: object = ..., _security_handler: StandardSecurityHandler | None = None) -> str: ...
def serialize(self, obj_dict: Unused = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
class StructTreeRoot(PDFObject):
type: str