Skip to content

Conversation

@yihong0618
Copy link
Contributor

@yihong0618 yihong0618 commented Oct 28, 2025

and found there is no test for disp_str
also add a test for it.

after this patch
cc @sergey-miryanov

image

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@yihong0618 yihong0618 changed the title fix: default REPL does not handle tab right gh-140502: fix default REPL does not handle tab right Oct 28, 2025
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@sergey-miryanov
Copy link
Contributor

sergey-miryanov commented Oct 28, 2025

On windows it works as expected without patch.
On ubuntu 24.10 in WSL (default terminal) before patch:

Python 3.15.0a1+ (heads/main:c6d4c79c9ab, Oct 29 2025, 00:24:08) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt6.QtWidgets import QApplication, QWidget
... from PyQt6.QtGui import QPainter, QColor, QPen
... from PyQt6.QtCore import Qt, QRect
... from cv2 import (
...     cvtColor                                                        ,
                                                    ...                 COLOR_Lab2RGB                           ,
                                                                                         ...            COLOR_HSV2RGB_FULL                      ,
                                                                                                                     ...                COLOR_HLS2RGB_FULL                      ,
                                                                                                                                                     ... 
                                                                                                                                                     ...                COLOR_RGB2Lab                           ,
                                                                                                                                                                                         ...            COLOR_RGB2HSV_FULL                      ,
                                                                                                                                                                                                                     ...                COLOR_RGB2HLS_FULL                      ,
                                                                                                                                                                                                                                                     ... 
                                                                                                                                                                                                                                                     ... )
                                                                                                                                                                                                                                                     ... 
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from PyQt6.QtWidgets import QApplication, QWidget
ModuleNotFoundError: No module named 'PyQt6'
>>> exit()

After patch:

Python 3.15.0a1+ (heads/main:c6d4c79c9ab, Oct 29 2025, 00:24:08) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt6.QtWidgets import QApplication, QWidget
... from PyQt6.QtGui import QPainter, QColor, QPen
... from PyQt6.QtCore import Qt, QRect
... from cv2 import (
...         cvtColor                                                        ,
...                 COLOR_Lab2RGB                           ,
...                 COLOR_HSV2RGB_FULL                      ,
...                 COLOR_HLS2RGB_FULL                      ,
... 
...                 COLOR_RGB2Lab                           ,
...                 COLOR_RGB2HSV_FULL                      ,
...                 COLOR_RGB2HLS_FULL                      ,
... 
... )
... 
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from PyQt6.QtWidgets import QApplication, QWidget
ModuleNotFoundError: No module named 'PyQt6'

So, it seems working.


if c == "\x1a": # CTRL-Z on Windows
if c == "\t": # gh-140502: handle tabs
width = 8 - (sum(char_widths) % 8)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to use a constant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the code below not use constant, so its fine here

yihong0618 and others added 3 commits October 29, 2025 08:45
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@sergey-miryanov
Copy link
Contributor

@pablogsal @ambv Could you please take a look.

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