Chilipp / docrep

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

Changed handling of decorators for classes in python 2.7 #9

Closed Chilipp closed 6 years ago

Chilipp commented 6 years ago

This should finally solve the troubles with python 2 mentioned in https://github.com/Chilipp/docrep/issues/5 and https://github.com/Chilipp/docrep/issues/2.

Pinging @lesteve and @guillaumeeb because of their previous interest.

Chilipp commented 6 years ago

If you're happy with this solution, I would merge it and create a new release (0.2.3). I added some notes in the installation docs and the changelog about the new behavior.

lesteve commented 6 years ago

Nice ! Glancing at the diff this looks like the simpler try/catch solution I had in mind (with additional bells and whistles for backward-compat).

Maybe I am missing something, but the snippet from https://github.com/Chilipp/docrep/issues/6#issue-315402262 still raises an exception. Maybe you forgot to add the try/catch in with_indent?

coveralls commented 6 years ago

Coverage Status

Coverage increased (+1.2%) to 97.423% when pulling 0ba440bda426c143d30829c53cf9cf0e4876b98f on dev into 14c2fd68ecbac7e0fec5a34805870926a14a6750 on master.

Chilipp commented 6 years ago

Good points 😅 That's why I do not like copy-and-paste. This should be solved by the changes in https://github.com/Chilipp/docrep/pull/9/commits/614796d9ce2597876884b494bd90939184356a8e

lesteve commented 6 years ago

I tried and the snippet mentioned above runs fine, thanks!