Skip to content

Commit

Permalink
Added type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 10, 2024
1 parent 38bfe3c commit 993bc6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PIL/ImageMath.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from __future__ import annotations

import builtins
from types import CodeType
from typing import Any

from . import Image, _imagingmath
Expand Down Expand Up @@ -257,7 +258,7 @@ def eval(expression: str, _dict: dict[str, Any] = {}, **kw: Any) -> Any:

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

def scan(code) -> None:
def scan(code: CodeType) -> None:
for const in code.co_consts:
if type(const) is type(compiled_code):
scan(const)
Expand Down

0 comments on commit 993bc6c

Please sign in to comment.