Skip to content
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

Added type hints to ImageMath #7707

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Jan 10, 2024

Helps #2625.

src/PIL/Image.py Outdated Show resolved Hide resolved
@@ -247,7 +257,7 @@ def eval(expression, _dict={}, **kw):

compiled_code = compile(expression, "<string>", "eval")

def scan(code):
def scan(code) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What type is code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code's type is CodeType :D

radarhere and others added 2 commits January 10, 2024 23:36
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk hugovk merged commit d6d6c7c into python-pillow:main Jan 11, 2024
56 checks passed
@radarhere radarhere deleted the type_hints_imagemath branch January 11, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants