mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
[fpdf2] Update stubs for fpdf 2.7.4 (#10136)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "2.7.1"
|
||||
version = "2.7.4"
|
||||
requires = ["types-Pillow>=9.2.0"]
|
||||
|
||||
[tool.stubtest]
|
||||
|
||||
@@ -45,6 +45,11 @@ class TextEmphasis(CoerciveIntFlag):
|
||||
@property
|
||||
def style(self) -> str: ...
|
||||
|
||||
class MethodReturnValue(CoerciveIntFlag):
|
||||
PAGE_BREAK: int
|
||||
LINES: int
|
||||
HEIGHT: int
|
||||
|
||||
class TableBordersLayout(CoerciveEnum):
|
||||
ALL: str
|
||||
NONE: str
|
||||
|
||||
@@ -19,6 +19,7 @@ from .enums import (
|
||||
AnnotationName,
|
||||
Corner,
|
||||
FileAttachmentAnnotationName,
|
||||
MethodReturnValue,
|
||||
PageLayout,
|
||||
PathPaintRule,
|
||||
RenderStyle,
|
||||
@@ -450,6 +451,8 @@ class FPDF(GraphicsStateMixin):
|
||||
new_x: XPos | str = ...,
|
||||
new_y: YPos | str = ...,
|
||||
wrapmode: WrapMode = ...,
|
||||
dry_run: bool = False,
|
||||
output: MethodReturnValue | str | int = ...,
|
||||
): ...
|
||||
def write(
|
||||
self, h: float | None = None, txt: str = "", link: str = "", print_sh: bool = False, wrapmode: WrapMode = ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete, Unused
|
||||
from collections.abc import Callable
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused
|
||||
from collections.abc import Callable, Iterable
|
||||
from html.parser import HTMLParser
|
||||
from logging import Logger
|
||||
from re import Match, Pattern
|
||||
@@ -10,7 +10,6 @@ from fpdf import FPDF
|
||||
|
||||
__author__: Final[str]
|
||||
__copyright__: Final[str]
|
||||
__license__: Final[str]
|
||||
|
||||
LOGGER: Logger
|
||||
BULLET_WIN1252: Final[str]
|
||||
@@ -55,9 +54,10 @@ class HTML2FPDF(HTMLParser):
|
||||
theader_out: bool
|
||||
table_row_height: int
|
||||
heading_level: Incomplete
|
||||
heading_sizes: Incomplete
|
||||
heading_sizes: dict[str, int]
|
||||
heading_above: float
|
||||
heading_below: float
|
||||
pre_code_font: str
|
||||
warn_on_tags_not_matching: bool
|
||||
|
||||
# Not initialized in __init__:
|
||||
@@ -72,7 +72,8 @@ class HTML2FPDF(HTMLParser):
|
||||
dd_tag_indent: int = 10,
|
||||
table_line_separators: bool = False,
|
||||
ul_bullet_char: str = "\x95",
|
||||
heading_sizes: Incomplete | None = None,
|
||||
heading_sizes: SupportsKeysAndGetItem[str, int] | Iterable[tuple[str, int]] | None = None,
|
||||
pre_code_font: str = "courier",
|
||||
warn_on_tags_not_matching: bool = True,
|
||||
**_: Unused,
|
||||
): ...
|
||||
|
||||
@@ -13,6 +13,11 @@ from .fpdf import FPDF
|
||||
|
||||
DEFAULT_HEADINGS_STYLE: FontFace
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RowLayoutInfo:
|
||||
height: int
|
||||
triggers_page_jump: bool
|
||||
|
||||
class Table:
|
||||
rows: list[Row]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user