Skip to content

Commit

Permalink
chore: Make .widget.urwid submodule private
Browse files Browse the repository at this point in the history
- Change: Rename `.urwid` -> `._urwid`
- Change: Upadte affected modules and tests.
  • Loading branch information
AnonymouX47 committed Dec 31, 2023
1 parent 4630dce commit a05d3dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/term_image/widget/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
except ImportError:
pass
else:
from .urwid import UrwidImage, UrwidImageCanvas, UrwidImageScreen
from ._urwid import UrwidImage, UrwidImageCanvas, UrwidImageScreen

del urwid
__all__ += ["UrwidImage", "UrwidImageCanvas", "UrwidImageScreen"]
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/widget/urwid/test_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def test_synced_output():

@contextmanager
def setup_clear_buffers():
from term_image.widget import urwid
from term_image.widget import _urwid

tty_buf = io.BytesIO()
write_tty = urwid.write_tty
urwid.write_tty = tty_buf.write
write_tty = _urwid.write_tty
_urwid.write_tty = tty_buf.write
buf.seek(0)
buf.truncate()
try:
Expand All @@ -91,7 +91,7 @@ def setup_clear_buffers():
buf.seek(0)
buf.truncate()
tty_buf.close()
urwid.write_tty = write_tty
_urwid.write_tty = write_tty


class TestClearImages:
Expand Down

0 comments on commit a05d3dd

Please sign in to comment.