Chilipp / docrep

A Python Module for intelligent reuse of docstrings
Apache License 2.0
30 stars 4 forks source link

More a question than an issue. #28

Closed LyonsDo closed 3 years ago

LyonsDo commented 3 years ago

Apologies if this isn't the right forum for this.

If I do %(my_func.parameters)s % meta it's fine, but the bare %(my_func.parameters) gives

...docrep\__init__.py", line 105, in safe_modulo
    return s % meta
ValueError: unsupported format character '?' (0xa) at index 139

I'm just not sure what's happening and if there's something I should change in my code. For example escaping literal % characters.

Chilipp commented 3 years ago

hey @LyonsDo. thanks for bringing this up!

"%(my_func.parameters) " is invalid python formatting syntax, that's why you are getting this ValueError. Don't know how to fix this within safe_modulo. The only thing you can do is escaping it yourself with "%%(my_func.parameters) ". Or what would you suggest?

LyonsDo commented 3 years ago

That seems to work fine. Thanks.

LyonsDo commented 3 years ago

Thanks @Chilipp.