Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
Update fpdf2 stubs to 2.6.1#9546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
eaaab5b2a986991e0a1952bbf381ccb8268ce0bf3873a5a81bebe27495db1e44a81e0ec35a6dfFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| cryptography |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| version = "2.6.0" | ||
| requires = ["types-Pillow"] | ||
| version = "2.6.1" | ||
| requires = ["types-Pillow>=9.2.0"] | ||
| [tool.stubtest] | ||
| ignore_missing_stub = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| from _typeshed import Incomplete, SupportsLenAndGetItem | ||
| from collections.abc import Generator, Iterable | ||
| from typing import ClassVar, Protocol, TypeVar | ||
| from typing_extensions import TypeAlias | ||
| from .enums import EncryptionMethod | ||
| from .fpdf import FPDF | ||
| from .syntax import Name, PDFObject | ||
| _Key: TypeAlias = SupportsLenAndGetItem[int] | ||
| _T_co = TypeVar("_T_co", covariant=True) | ||
| import_error: ImportError | None | ||
| class _SupportsGetItem(Protocol[_T_co]): | ||
| def __getitem__(self, __k: int) -> _T_co: ... | ||
| class ARC4: | ||
| MOD: ClassVar[int] | ||
| def KSA(self, key: _Key) -> list[int]: ... | ||
| def PRGA(self, S: _SupportsGetItem[int]) -> Generator[int, None, None]: ... | ||
| def encrypt(self, key: _Key, text: Iterable[int]) -> list[int]: ... | ||
| class CryptFilter: | ||
| type: Name | ||
| c_f_m: Name | ||
| length: int | ||
| def __init__(self, mode, length) -> None: ... | ||
| def serialize(self) -> str: ... | ||
| class EncryptionDictionary(PDFObject): | ||
| filter: Name | ||
| length: int | ||
| r: int | ||
| o: str | ||
| u: str | ||
| v: int | ||
| p: int | ||
| encrypt_metadata: str # not always defined | ||
| c_f: str # not always defined | ||
| stm_f: Name | ||
| str_f: Name | ||
| def __init__(self, security_handler: StandardSecurityHandler) -> None: ... | ||
| class StandardSecurityHandler: | ||
| DEFAULT_PADDING: ClassVar[bytes] | ||
| fpdf: FPDF | ||
| access_permission: int | ||
| owner_password: str | ||
| user_password: str | ||
| encryption_method: EncryptionMethod | None | ||
| cf: CryptFilter | None | ||
| key_length: int | ||
| v: int | ||
| r: int | ||
srittau marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| encrypt_metadata: bool | ||
| # The following fields are only defined after a call to generate_passwords(). | ||
| file_id: Incomplete | ||
| info_id: Incomplete | ||
| o: str | ||
| k: str | ||
| u: str | ||
| def __init__( | ||
| self, | ||
| fpdf: FPDF, | ||
| owner_password: str, | ||
| user_password: str | None = None, | ||
| permission: Incomplete | None = None, | ||
| encryption_method: EncryptionMethod | None = None, | ||
| encrypt_metadata: bool = False, | ||
| ) -> None: ... | ||
| def generate_passwords(self, file_id) -> None: ... | ||
| def get_encryption_obj(self) -> EncryptionDictionary: ... | ||
| def encrypt(self, text: str | bytes | bytearray, obj_id) -> bytes: ... | ||
| def encrypt_string(self, string, obj_id): ... | ||
| def encrypt_stream(self, stream, obj_id): ... | ||
| def is_aes_algorithm(self) -> bool: ... | ||
| def encrypt_bytes(self, data, obj_id) -> list[int]: ... | ||
| def encrypt_AES_cryptography(self, key, data): ... | ||
| def get_initialization_vector(self, size: int) -> bytearray: ... | ||
| def padded_password(self, password: str) -> bytearray: ... | ||
| def generate_owner_password(self) -> str: ... | ||
| def generate_user_password(self) -> str: ... | ||
| def generate_encryption_key(self) -> bytes: ... | ||
| def md5(data: bytes) -> bytes: ... | ||
| def int32(n: int) -> int: ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,6 +3,7 @@ from collections.abc import Callable | ||
| from html.parser import HTMLParser | ||
| from logging import Logger | ||
| from re import Match, Pattern | ||
| from typing import ClassVar | ||
| from typing_extensions import Final | ||
| from fpdf import FPDF | ||
| @@ -24,6 +25,7 @@ def px2mm(px: float) -> float: ... | ||
| def color_as_decimal(color: str | None = ...) -> tuple[int, int, int] | None: ... | ||
| class HTML2FPDF(HTMLParser): | ||
| HTML_UNCLOSED_TAGS: ClassVar[tuple[str, ...]] | ||
| pdf: Incomplete | ||
| image_map: Incomplete | ||
| li_tag_indent: Incomplete | ||
| @@ -55,15 +57,17 @@ class HTML2FPDF(HTMLParser): | ||
| heading_sizes: Incomplete | ||
| heading_above: float | ||
| heading_below: float | ||
| warn_on_tags_not_matching: bool | ||
| def __init__( | ||
srittau marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| self, | ||
| pdf: FPDF, | ||
| image_map: Callable[[str], str] | None = ..., | ||
| li_tag_indent: int = ..., | ||
| dd_tag_indent: int = ..., | ||
| table_line_separators: bool = ..., | ||
| image_map: Callable[[str], str] | None = None, | ||
| li_tag_indent: int = 5, | ||
| dd_tag_indent: int = 10, | ||
| table_line_separators: bool = False, | ||
| ul_bullet_char: str = ..., | ||
| heading_sizes: Incomplete | None = ..., | ||
| heading_sizes: Incomplete | None = None, | ||
| warn_on_tags_not_matching: bool = True, | ||
| **_: object, | ||
| ): ... | ||
| def width2unit(self, length): ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,7 +11,10 @@ class Fragment: | ||
| characters: list[str] | ||
| graphics_state: dict[str, Incomplete] | ||
| k: float | ||
srittau marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| def __init__(self, characters: list[str] | str, graphics_state: dict[str, Incomplete], k: float) -> None: ... | ||
| url: str | None | ||
| def __init__( | ||
| self, characters: list[str] | str, graphics_state: dict[str, Incomplete], k: float, url: str | None = None | ||
| ) -> None: ... | ||
| @property | ||
| def font(self): ... | ||
| @font.setter | ||
| @@ -96,6 +99,7 @@ class CurrentLine: | ||
| k: float, | ||
| original_fragment_index: int, | ||
| original_character_index: int, | ||
| url: str | None = None, | ||
| ): ... | ||
| def manual_break(self, justify: bool = ..., trailing_nl: bool = ...): ... | ||
| def automatic_break_possible(self): ... | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.