Skip to content

Added type hints for format and format_description #7624

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

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added type hints for format and format_description
  • Loading branch information
radarhere committed Dec 19, 2023
commit 1f9dafec80cd19fdb94f7110fe53d29581ee9b6b
6 changes: 4 additions & 2 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# See the README file for information on usage and redistribution.
#

from __future__ import annotations

import atexit
import builtins
import io
Expand Down Expand Up @@ -477,8 +479,8 @@ class Image:
* :py:func:`~PIL.Image.frombytes`
"""

format = None
format_description = None
format: str | None = None
format_description: str | None = None
_close_exclusive_fp_after_loading = True

def __init__(self):
Expand Down