forked from python/typeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract PIL and zipfile to python#10706
- Loading branch information
Showing
10 changed files
with
27 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
from _typeshed import SupportsRead | ||
from pathlib import Path | ||
from types import ModuleType | ||
from typing import Any | ||
from typing_extensions import Literal, TypeAlias | ||
|
||
# Is actually PIL.Image.Image | ||
_PILImageImage: TypeAlias = Any | ||
# same as first parameter of PIL.Image.open | ||
_PILImageFilePath: TypeAlias = str | bytes | Path | SupportsRead[bytes] | ||
|
||
PILImage: ModuleType | Literal[False] | ||
from _typeshed import Incomplete | ||
|
||
class Image: | ||
anchor: str | ||
ref: _PILImageImage | _PILImageFilePath | ||
format: str | ||
def __init__(self, img: _PILImageImage | _PILImageFilePath) -> None: ... | ||
ref: Incomplete | ||
format: Incomplete | ||
def __init__(self, img) -> None: ... | ||
@property | ||
def path(self) -> str: ... | ||
def path(self): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
from zipfile import ZipFile | ||
|
||
from openpyxl.chart._chart import ChartBase | ||
from openpyxl.drawing.image import Image | ||
|
||
def find_images(archive: ZipFile, path: str) -> tuple[list[ChartBase], list[Image]]: ... | ||
def find_images(archive, path): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
from _typeshed import StrPath | ||
from typing import IO | ||
from zipfile import ZipFile | ||
|
||
from openpyxl.packaging.manifest import Manifest | ||
from openpyxl.workbook.workbook import Workbook | ||
from _typeshed import Incomplete | ||
|
||
class ExcelWriter: | ||
workbook: Workbook | ||
manifest: Manifest | ||
vba_modified: set[str | None] | ||
def __init__(self, workbook: Workbook, archive: ZipFile) -> None: ... | ||
workbook: Incomplete | ||
manifest: Incomplete | ||
vba_modified: Incomplete | ||
def __init__(self, workbook, archive) -> None: ... | ||
def write_data(self) -> None: ... | ||
def write_worksheet(self, ws) -> None: ... | ||
def save(self) -> None: ... | ||
|
||
def save_workbook(workbook, filename: StrPath | IO[bytes]): ... | ||
def save_workbook(workbook, filename): ... |