PyPSA / linopy

Linear optimization with N-D labeled arrays in Python
https://linopy.readthedocs.io
MIT License
154 stars 42 forks source link

Better doc by explicitly using __qualname__ instead of __repr__() #238

Closed leuchtum closed 4 months ago

leuchtum commented 4 months ago

Description

By explicitly using the __qualname__ string of an object (introduced in PEP 3155), the documentation does not include the <...> brackets with the memory address.

Screenshots

HereVariable.assign_attrs as an example, but more methods are affected.

Screenshot documentation BEFORE changes

Bildschirmfoto 2024-02-27 um 22 48 29

Screenshot documentation AFTER changes

Bildschirmfoto 2024-02-27 um 22 48 14
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.13%. Comparing base (497061a) to head (9b8bf1c). Report is 14 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #238 +/- ## ========================================== + Coverage 88.07% 88.13% +0.06% ========================================== Files 15 15 Lines 3413 3440 +27 Branches 789 793 +4 ========================================== + Hits 3006 3032 +26 - Misses 296 297 +1 Partials 111 111 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

FabianHofmann commented 4 months ago

great, thanks @leuchtum