When I define functions inside a markdown-exec block, the functions don't possess the __module__ attribute:
def f(x):
return x + 1.0
print(f.__module__)
returns None
This, unfortunately, interacts poorly with systems that expect a __module__ attribute (beartype/beartype#381)
For instance, I was attempting to setup some documentation to show my users what a beartype error would look like, but ran into this issue where beartype expects the callable which it is typechecking to have a __module__ attribute (beartype/beartype#381).
Is it possible to configure markdown-exec to supply a dummy module? Or to use the session string as the dummy module?
Environment
Working with: markdown-exec==1.8.1
When I define functions inside a
markdown-execblock, the functions don't possess the__module__attribute:returns
NoneThis, unfortunately, interacts poorly with systems that expect a
__module__attribute (beartype/beartype#381)For instance, I was attempting to setup some documentation to show my users what a
beartypeerror would look like, but ran into this issue wherebeartypeexpects the callable which it is typechecking to have a__module__attribute (beartype/beartype#381).Is it possible to configure
markdown-execto supply a dummy module? Or to use thesessionstring as the dummy module?Environment
Working with:
markdown-exec==1.8.1