pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

fix: don't reuse text in qcollapsible #204

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

fixes #203

not quite sure why that was like that ... might have been a combination of #140 not updating #37?
but i think it's fine just to remove it

coderabbitai[bot] commented 1 year ago

Walkthrough

The proposed change simplifies the setText method in a toggle button class. It enhances readability by directly setting the text instead of appending it to the existing one, without altering the method's behavior.

Changes

File Summary
.../superqt/collapsible/_collapsible.py The setText method of the toggle button class has been simplified. It now directly sets the text rather than appending it to the current text. This improves clarity and removes unnecessary code while maintaining the same functionality.

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% :warning:

Comparison is base (409d19e) 87.30% compared to head (79555b0) 87.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #204 +/- ## ========================================== - Coverage 87.30% 87.30% -0.01% ========================================== Files 45 45 Lines 3324 3323 -1 ========================================== - Hits 2902 2901 -1 Misses 422 422 ``` | [Files Changed](https://app.codecov.io/gh/pyapp-kit/superqt/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit) | Coverage Δ | | |---|---|---| | [src/superqt/collapsible/\_collapsible.py](https://app.codecov.io/gh/pyapp-kit/superqt/pull/204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyapp-kit#diff-c3JjL3N1cGVycXQvY29sbGFwc2libGUvX2NvbGxhcHNpYmxlLnB5) | `94.73% <100.00%> (-0.05%)` | :arrow_down: |

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