EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 8 forks source link

Enable pyupgrade in ruff and fix the issues that pop up #356

Closed dalonsoa closed 1 week ago

dalonsoa commented 1 week ago

Description

pyupgrade is now enabled in ruff, using python 3.9 as the target since we want to keep the compatibility with it. As usual with these things, a lot of files are changed, but otherwise you should only worried about pyproject.toml.

Fixes #293

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.

Key checklist

Further checks

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 74.26710% with 79 lines in your changes missing coverage. Please review.

Project coverage is 71.24%. Comparing base (9938ba9) to head (e2e6888).

Files Patch % Lines
src/muse/readers/csv.py 40.47% 18 Missing and 7 partials :warning:
src/muse/outputs/mca.py 42.10% 7 Missing and 4 partials :warning:
src/muse/regressions.py 47.05% 9 Missing :warning:
src/muse/investments.py 40.00% 1 Missing and 5 partials :warning:
src/muse/examples.py 80.00% 3 Missing :warning:
src/muse/production.py 57.14% 1 Missing and 2 partials :warning:
src/muse/agents/factories.py 71.42% 0 Missing and 2 partials :warning:
src/muse/hooks.py 75.00% 0 Missing and 2 partials :warning:
src/muse/interactions.py 71.42% 0 Missing and 2 partials :warning:
src/muse/objectives.py 75.00% 1 Missing and 1 partial :warning:
... and 11 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #356 +/- ## =========================================== + Coverage 71.14% 71.24% +0.09% =========================================== Files 44 44 Lines 5844 5870 +26 Branches 1158 1158 =========================================== + Hits 4158 4182 +24 - Misses 1364 1366 +2 Partials 322 322 ```

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