FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use monkeypatch by radarhere · Pull Request #8626 · python-pillow/Pillow · GitHub

Use monkeypatch - #8626

Merged
hugovk merged 2 commits into
python-pillow:mainfrom
radarhere:monkeypatch
Dec 27, 2024
Merged

Use monkeypatch#8626
hugovk merged 2 commits into
python-pillow:mainfrom
radarhere:monkeypatch

Conversation

radarhere commented Dec 27, 2024
edited
Loading

Copy link
Copy Markdown
Member

This is part of #8362 - I'm hoping to break down that PR into easier-to-review chunks.

  1. Uses monkeypatch for
    def im_draft(
    mode: str, size: tuple[int, int]
    ) -> tuple[str, tuple[int, int, float, float]] | None:
    result = draft(mode, size)
    assert result is not None
    return result
    im.draft = im_draft
  2. Updates the type arguments in the mock method to match

    Pillow/src/PIL/Image.py

    Lines 1326 to 1327 in f9767fb

    def draft(
    self, mode: str | None, size: tuple[int, int] | None

hugovk merged commit 4db5be1 into python-pillow:main Dec 27, 2024
radarhere deleted the monkeypatch branch December 27, 2024 19:49
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL