aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
7 stars 17 forks source link

Use Ruff #566

Closed danielhollas closed 7 months ago

danielhollas commented 7 months ago

Besides flake8 plugins that we already had, I've added ruff-specific rules (RUF). Especially the one that detects unnecessary list comprehension is quite useful and made a couple of places more readable.

I've disabled a couple of rules that would take more work to resolve all.

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 87.07%. Comparing base (3bce8e7) to head (fe7f3b9). Report is 2 commits behind head on master.

Files Patch % Lines
aiidalab_widgets_base/structures.py 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #566 +/- ## ======================================= Coverage 87.07% 87.07% ======================================= Files 27 27 Lines 4649 4649 ======================================= Hits 4048 4048 Misses 601 601 ``` | [Flag](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/566/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [python-3.10](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/566/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `87.07% <91.30%> (ø)` | | | [python-3.9](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/566/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `87.10% <91.30%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#carryforward-flags-in-the-pull-request-comment) to find out more.

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