Skip to content

Typing: annotate text_layout and extend Text/Edit#793

Merged
penguinolog merged 1 commit intourwid:masterfrom
penguinolog:typing_text
Feb 7, 2024
Merged

Typing: annotate text_layout and extend Text/Edit#793
penguinolog merged 1 commit intourwid:masterfrom
penguinolog:typing_text

Conversation

@penguinolog
Copy link
Collaborator

  • Canvas: do not accept any arguments in the constructor. Arguments deprecated many years ago, renamed error was raise before.
  • StandardTextLayout: split calculate_text_segments scenario for clip and ellipsis from any and space. Extremely long methods with 2 main branches. Use human-friendly variable naming.
  • Text/Edit: In several methods intentionally do not mark bytes as valid argument: Due to the amount of transcoding, str is absolute priority
Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)

@coveralls
Copy link

coveralls commented Feb 7, 2024

Pull Request Test Coverage Report for Build 7812944319

  • -8 of 109 (92.66%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 70.888%

Changes Missing Coverage Covered Lines Changed/Added Lines %
urwid/text_layout.py 84 92 91.3%
Files with Coverage Reduction New Missed Lines %
urwid/text_layout.py 1 87.5%
Totals Coverage Status
Change from base Build 7811498686: 0.003%
Covered Lines: 8773
Relevant Lines: 12461

💛 - Coveralls

* `Canvas`: do not accept any arguments in the constructor.
  Arguments deprecated many years ago, renamed error was raise before.
* `StandardTextLayout`: split `calculate_text_segments`
  scenario for `clip` and `ellipsis` from `any` and `space`.
  Extremely long methods with 2 main branches.
  Use human-friendly variable naming.
* `Text`/`Edit`: In several methods intentionally do not mark bytes as valid argument:
  Due to the amount of transcoding, `str` is absolute priority
@penguinolog penguinolog merged commit 3a8954a into urwid:master Feb 7, 2024
@penguinolog penguinolog deleted the typing_text branch February 7, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants