Fix incorrect type cast in vterm (apply_mapping should return bytes)#545
Conversation
7e1ea53 to
34a2e06
Compare
|
|
||
| >>> changes = [] | ||
| >>> def callback_a(cb, state, user_data): | ||
| >>> def callback_a(user_data, cb, state): |
There was a problem hiding this comment.
@wardi looks like incorrect resolve order in Signals.emit: cb is part of *args -> put after user_args and before deprecated user_arg.
| profile = "black" | ||
| line_length = 120 | ||
|
|
||
| [tool.pytest.ini_options] |
There was a problem hiding this comment.
now preparation only: warnings collected much better, but non-stable event loop tests and fully incompatible test_vterm
| return canv | ||
|
|
||
|
|
||
| class SolidFill(BoxWidget): |
There was a problem hiding this comment.
many years deprecated base class
| dec_pos = DEC_SPECIAL_CHARS.find(char.decode('cp437')) | ||
| if dec_pos >= 0: | ||
| self.current = '0' | ||
| return str(ALT_DEC_SPECIAL_CHARS[dec_pos]) |
There was a problem hiding this comment.
incorrect cast, will cause BytesWarning
| self.expect(' x5a98765') | ||
|
|
||
| def test_scrolling_region_simple(self): | ||
| # TODO(Aleksei): Issue #544 |
There was a problem hiding this comment.
4 tests which fail on regular basis
There was a problem hiding this comment.
we can mark them as flaky or to be skipped so they don't fail unrelated changes, can't we?
Add `time.sleep(0.1)` to the event loop tests: in the worst scenario on windows and slow machine function in parallel thread/async can wait up to 80 milliseconds (tested) Add type annotations to the `vterm` and `test_vterm` to simplify error lookup. * Fix `DeprecationWarning` in doctests & examples * Add `pytest` configuration in `pyproject.toml` without migration * `Signals.emit()` rework: stop `user_args` join with `weak_args` Partial: urwid#544 Partial: urwid#512 Partial: urwid#406
34a2e06 to
5909a22
Compare
| ``command`` is the command to execute inside the terminal, | ||
| provided as a list of the command followed by its arguments. | ||
| If 'command' is None, the command is the current user's shell. | ||
| You can also provide a callable instead of a command, which will be executed in the subprocess. |
There was a problem hiding this comment.
seems like you almost aligned this paragraph to a new line width
There was a problem hiding this comment.
I changed split to increase readability: misread caused incomplete type annotation
* set timer for errors raise to 0: faster raise, faster test done
Add
time.sleep(0.1)to the event loop tests:in the worst scenario on windows and slow machine
function in parallel thread/async can wait up to 80 milliseconds (tested)
Add type annotations to the
vtermandtest_vtermto simplify error lookup.Partial: #544
Partial: #512
Partial: #406
Checklist
masterorpython-dual-supportbranchtoxsuccessfully in local environment