Skip to content

Commit

Permalink
chore(examples): pass __module__ so that koerce can evaluate typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs committed Sep 11, 2024
1 parent f07026d commit 3e244e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibis/examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def __getattr__(name: str) -> Example:

description = meta[name].get("description")

fields = {"__doc__": description} if description is not None else {}
fields = {"__module__": __name__}
if description is not None:
fields["__doc__"] = description

example_class = type(name, (Example,), fields)
example_class.fetch.__doc__ = _FETCH_DOCSTRING_TEMPLATE.format(name=name)
Expand Down

0 comments on commit 3e244e1

Please sign in to comment.