Skip to content

Commit

Permalink
Complete type hints for public API (#15)
Browse files Browse the repository at this point in the history
* Complete type hints for public API

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use future annotations

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
AlexWaygood and pre-commit-ci[bot] authored Apr 19, 2024
1 parent e2d07d7 commit a1120c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pysource_minimize/_minimize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from __future__ import annotations

import ast
import warnings
from collections.abc import Callable

from ._minimize_base import equal_ast
from ._minimize_structure import MinimizeStructure
Expand Down Expand Up @@ -52,7 +55,11 @@ def minimize_ast(


def minimize(
source: str, checker, *, progress_callback=lambda current, total: None, retries=1
source: str,
checker: Callable[[str], bool],
*,
progress_callback: Callable[[int, int], object] = lambda current, total: None,
retries: int = 1,
) -> str:
"""
minimzes the source code
Expand Down

0 comments on commit a1120c0

Please sign in to comment.