Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions icecream.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .icecream import *
3 changes: 3 additions & 0 deletions icecream/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .icecream import *
from .builtins import install as install, uninstall as uninstall
from os.path import dirname as dirname
3 changes: 3 additions & 0 deletions icecream/__version__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__contact__: str
__url__: str
__description__: str
6 changes: 6 additions & 0 deletions icecream/builtins.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from typing import Any

builtins: Any

def install(ic: str = ...) -> None: ...
def uninstall(ic: str = ...) -> None: ...
22 changes: 22 additions & 0 deletions icecream/coloring.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from typing import Dict
from pygments.style import Style
from pygments.token import _TokenType

class SolarizedDark(Style):
BASE03: str
BASE02: str
BASE01: str
BASE00: str
BASE0: str
BASE1: str
BASE2: str
BASE3: str
YELLOW: str
ORANGE: str
RED: str
MAGENTA: str
VIOLET: str
BLUE: str
CYAN: str
GREEN: str
styles: Dict[_TokenType, str]
49 changes: 49 additions & 0 deletions icecream/icecream.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import executing # type: ignore
import pprint
from typing import Any
from collections.abc import Generator

PYTHON2: bool

def bindStaticVariable(name, value) -> None: ...
def colorize(s) -> None: ...
def supportTerminalColorsInWindows() -> Generator[None, None, None]: ...
def stderrPrint(*args) -> None: ...
def isLiteral(s) -> None: ...
def colorizedStderrPrint(s) -> None: ...

DEFAULT_PREFIX: str
DEFAULT_LINE_WRAP_WIDTH: int
DEFAULT_CONTEXT_DELIMITER: str
DEFAULT_OUTPUT_FUNCTION = colorizedStderrPrint
DEFAULT_ARG_TO_STRING_FUNCTION = pprint.pformat
NO_SOURCE_AVAILABLE_WARNING_MESSAGE: str

def callOrValue(obj) -> None: ...

class Source(executing.Source):
def get_text_with_indentation(self, node) -> None: ...

def prefixLinesAfterFirst(prefix, s) -> None: ...
def indented_lines(prefix, string) -> None: ...
def format_pair(prefix, arg, value) -> None: ...
def singledispatch(func) -> None: ...
def argumentToString(obj) -> None: ...

class IceCreamDebugger:
lineWrapWidth: int
contextDelimiter: str
enabled: bool
prefix: str
includeContext: bool
outputFunction: Any
argToStringFunction: Any
contextAbsPath: str
def __init__(self, prefix=..., outputFunction=..., argToStringFunction=..., includeContext: bool = ..., contextAbsPath: bool = ...) -> None: ...
def __call__(self, *args) -> None: ...
def format(self, *args) -> None: ...
def enable(self) -> None: ...
def disable(self) -> None: ...
def configureOutput(self, prefix=..., outputFunction=..., argToStringFunction=..., includeContext=..., contextAbsPath=...) -> None: ...

ic: IceCreamDebugger
Empty file added icecream/py.typed
Empty file.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def run_tests(self):
platforms=['any'],
packages=find_packages(),
include_package_data=True,
package_data={"icecream": ["py.typed", "*.pyi"]},
classifiers=[
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ description =
run unittest
commands =
python -m unittest

[testenv:py39]
deps =
{[testenv]deps}
mypy

commands =
python -m unittest
python3 -m mypy --install-types --non-interactive
python3 -m mypy.stubtest --ignore-missing-stub icecream