diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..d887c9f66d7eaeaa860c4c7434c0beff79fa632f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include pytato *.pyi diff --git a/pytato/stubs/pytools.pyi b/pytato/stubs/pytools.pyi new file mode 100644 index 0000000000000000000000000000000000000000..82531cc621a422514f005fc22fa12acb68e3b25d --- /dev/null +++ b/pytato/stubs/pytools.pyi @@ -0,0 +1,11 @@ +# FIXME: Should be in pytools +from typing import TypeVar, Iterable, Optional + +T = TypeVar("T") + +def memoize_method(f: T) -> T: ... +def is_single_valued(it: Iterable[T]) -> bool: ... + +class UniqueNameGenerator: + def __init__(self, existing_names: Optional[Iterable[str]], forced_prefix: str=""): ... + def __call__(self, based_on: str = "") -> str: ... diff --git a/run-mypy.sh b/run-mypy.sh index 14730b1d67342861db2c2e0d61655cbec4b0fdf0..72b4e41ac2e3e70ee8e050e042258d6513ae6f6a 100755 --- a/run-mypy.sh +++ b/run-mypy.sh @@ -1,3 +1,4 @@ #! /bin/bash +export MYPYPATH=$MYPYPATH:pytato/stubs/ mypy --strict pytato diff --git a/setup.cfg b/setup.cfg index 9984342ffaa980286002b40bdba5c75c15de35e9..7b0c351a9b91804e0ae6a83645075f80e3acfce7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,3 @@ ignore_missing_imports = True [mypy-pyopencl] ignore_missing_imports = True - -[mypy-pytools] -ignore_missing_imports = True -