Closed mashrurmorshed closed 3 years ago
The bug is here
if remove_package:
# Remove all package path from signature
signature = re.sub(r"([a-zA-Z0-9_]*?\.)", "", signature)
While attempting to remove package names, floating point defaults in the function signature are losing their floating decimal dot.
@ID56 Thanks for reporting and investigating the issue :) I have pushed a small fix for this issue here: https://github.com/ml-tooling/lazydocs/commit/dd8706583b53310730f4288334129a8bd7f3c43f
Describe the bug: Decimal points are missed in default float values.
For example, if I have a function
def foo(x = 0.01):
, the docs will show x = 01. The markdown generator is unable to handle floating point default values.Expected behaviour:
I expect my default floating point values to show up how I specified them in the code.
Steps to reproduce the issue:
For example, for the following function:
Lazydoc renders it as:
Note the
x=01
, missing the ".".Technical details:
Possible Fix:
Most likely there isn't any floating point support, or something's missing somewhere. I believe this should be an easy fix.
Additional context: