Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use deprecated positioning in the code and examples #869

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

penguinolog
Copy link
Collaborator

Deprecated, but still supported:

  • "fixed left"
  • "fixed right"
  • "fixed top"
  • "fixed bottom"
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)

Deprecated, but still supported:
* "fixed left"
* "fixed right"
* "fixed top"
* "fixed bottom"
@github-actions github-actions bot added docs Issues related to documentation Widget labels Apr 10, 2024
Literal["left", "center", "right"] | Align | tuple[Literal["relative", WHSettings.RELATIVE], int]
Literal["left", "center", "right"]
| Align
| tuple[Literal["relative", WHSettings.RELATIVE, "fixed left", "fixed right"], int]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type annotate supported (not add to docs, just simplify work with existing code)

@coveralls
Copy link

coveralls commented Apr 10, 2024

Pull Request Test Coverage Report for Build 8634468076

Details

  • 41 of 43 (95.35%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 74.685%

Changes Missing Coverage Covered Lines Changed/Added Lines %
urwid/widget/monitored_list.py 40 42 95.24%
Totals Coverage Status
Change from base Build 8595868168: 0.04%
Covered Lines: 9393
Relevant Lines: 12722

💛 - Coveralls

urwid.LEFT,
urwid.RELATIVE_100,
urwid.TOP,
urwid.RELATIVE_100,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it we're breaking this into multiple lines there's room to use keyword args to make the parameters easier to understand

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@penguinolog
Copy link
Collaborator Author

penguinolog commented Apr 10, 2024

Stable doctests fail on python 3.11 linux.
Can not reproduce locally on ubuntu 23.10:

 ----------------------------------------------------------------------
Ran 420 tests in 5.439s

OK (skipped=8)

UP: reproduced with the last python 3.11 docker image.
Investigation points, that it's cpython regression from python/cpython#115392 fix in python/cpython#115458

@penguinolog penguinolog requested a review from wardi April 10, 2024 15:41
sort = _call_modified(list.sort) # type: ignore[assignment] # magic like old __super__
if hasattr(list, "clear"):
clear = _call_modified(list.clear) # type: ignore[assignment] # magic like old __super__
@_call_modified
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override explicit to allow __code__ for doctests

@penguinolog penguinolog merged commit 74a8bc5 into urwid:master Apr 15, 2024
35 checks passed
@penguinolog penguinolog deleted the deprecated_positioning branch April 15, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues related to documentation refactoring Widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants