collective / sphinxcontrib-httpexample

Adds example directive for sphinx-contrib httpdomain
23 stars 20 forks source link

float support #42

Closed divi255 closed 5 years ago

divi255 commented 5 years ago

JSON with float values fails to build with Exception occurred: File "/home/docs/checkouts/readthedocs.org/user_builds/eva-ics/envs/latest/lib/python2.7/site-packages/sphinxcontrib/httpexample/builders.py", line 211, in astify_json_obj raise Exception('Cannot astify {0:s}'.format(str(obj)))

adding ... elif isinstance(obj, float):
return ast.Name(obj, ast.Load()) ... to astify_json_obj function fixes this issue