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
2 changes: 1 addition & 1 deletion computation_graph/graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def f(x) -> int: # Bad typing!
graph_runners.nullary(composers.make_compose(f, lambda: "world"), f)
== "hello world"
)
assert "TypeError" in caplog.text
assert "not an instance" in caplog.text


def test_type_safety_messages_no_overtrigger(caplog):
Expand Down
6 changes: 3 additions & 3 deletions computation_graph/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def _type_check(node: base_types.ComputationNode, result):
return_typing = typing.get_type_hints(node.func).get("return", None)
if return_typing:
try:
typeguard.check_type(str(node), result, return_typing)
except TypeError as e:
logging.error([node.func.__code__, e])
typeguard.check_type(result, return_typing)
except typeguard.TypeCheckError as e:
logging.error([node.func.__code__, str(e)])


def _profile(node, time_started: float):
Expand Down
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
long_description=_LONG_DESCRIPTION,
long_description_content_type="text/markdown",
packages=setuptools.find_namespace_packages(),
install_requires=[
"gamla",
"typeguard==2.13.3",
"toposort",
"immutables",
"termcolor",
],
install_requires=["gamla", "typeguard", "toposort", "immutables", "termcolor"],
extras_require={"test": ["pygraphviz", "pytest>=5.4.0"]},
)