From d7ca254ae3c8ad6c6eccf5ab508da6b03ac65dc4 Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Sat, 29 Jun 2024 00:56:16 +0200 Subject: [PATCH] refactoring: move pretty to lib (#5551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #5538 ## For community ⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment** --------- Co-authored-by: a <1@1.1> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tests/{ => lib}/test_pretty.py | 2 +- xonsh/{ => lib}/pretty.py | 0 xonsh/main.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename tests/{ => lib}/test_pretty.py (97%) rename xonsh/{ => lib}/pretty.py (100%) diff --git a/tests/test_pretty.py b/tests/lib/test_pretty.py similarity index 97% rename from tests/test_pretty.py rename to tests/lib/test_pretty.py index 94c7ea8b9..c732118ee 100644 --- a/tests/test_pretty.py +++ b/tests/lib/test_pretty.py @@ -2,7 +2,7 @@ import re import pytest -from xonsh import pretty +from xonsh.lib import pretty long_list = ["str"] * 30 long_list_exp = "[" + (",\n ".join(["'str'"] * 30) + "]") diff --git a/xonsh/pretty.py b/xonsh/lib/pretty.py similarity index 100% rename from xonsh/pretty.py rename to xonsh/lib/pretty.py diff --git a/xonsh/main.py b/xonsh/main.py index 01835274a..3037a0edf 100644 --- a/xonsh/main.py +++ b/xonsh/main.py @@ -20,8 +20,8 @@ from xonsh.imphooks import install_import_hooks from xonsh.jobs import ignore_sigtstp from xonsh.lazyasd import lazyobject from xonsh.lazyimps import pyghooks, pygments +from xonsh.lib.pretty import pretty from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS -from xonsh.pretty import pretty from xonsh.shell import Shell from xonsh.timings import setup_timings from xonsh.tools import (