Skip to content

Commit

Permalink
ignore some cases where pyright doesn't know about the name field
Browse files Browse the repository at this point in the history
  • Loading branch information
shinnar committed Dec 3, 2020
1 parent fde6ee5 commit ff1a1fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lale/pretty_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def value_to_string(value):
elif isinstance(value, np.ufunc):
if gen is not None:
gen.imports.append("import numpy as np")
return f"np.{value.__name__}"
return f"np.{value.__name__}" # type: ignore
elif isinstance(value, lale.expressions.Expr):
if gen is not None:
gen.imports.append("from lale.expressions import it")
Expand All @@ -114,7 +114,7 @@ def value_to_string(value):
gen.imports.append(f"import {module}")
else:
gen.imports.append(f"import {value.__module__} as {module}")
return f"{module}.{value.__name__}"
return f"{module}.{value.__name__}" # type: ignore
elif hasattr(value, "get_params"):
module = value.__module__
if module.startswith("sklearn."):
Expand Down

0 comments on commit ff1a1fb

Please sign in to comment.