From 772ee21643565bf788faabb1b34a6cf0790bdf9e Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Sat, 29 Jun 2024 01:56:18 +0200 Subject: [PATCH] refactoring: move openpy, inspectors to lib (#5553) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/xonsh/xonsh/issues/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> --- xonsh/built_ins.py | 2 +- xonsh/{ => lib}/inspectors.py | 2 +- xonsh/{ => lib}/openpy.py | 0 xonsh/tracer.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename xonsh/{ => lib}/inspectors.py (99%) rename xonsh/{ => lib}/openpy.py (100%) diff --git a/xonsh/built_ins.py b/xonsh/built_ins.py index 4ba75572d..c12984a62 100644 --- a/xonsh/built_ins.py +++ b/xonsh/built_ins.py @@ -19,8 +19,8 @@ import types import warnings from ast import AST -from xonsh.inspectors import Inspector from xonsh.lazyasd import lazyobject +from xonsh.lib.inspectors import Inspector from xonsh.platform import ON_POSIX from xonsh.tools import ( XonshCalledProcessError, diff --git a/xonsh/inspectors.py b/xonsh/lib/inspectors.py similarity index 99% rename from xonsh/inspectors.py rename to xonsh/lib/inspectors.py index 91a06b396..e5f2321f2 100644 --- a/xonsh/inspectors.py +++ b/xonsh/lib/inspectors.py @@ -17,7 +17,7 @@ import types from xonsh.lazyasd import LazyObject from xonsh.lazyimps import pyghooks, pygments -from xonsh.openpy import read_py_file +from xonsh.lib.openpy import read_py_file from xonsh.platform import HAS_PYGMENTS from xonsh.style_tools import partial_color_tokenize from xonsh.tokenize import detect_encoding diff --git a/xonsh/openpy.py b/xonsh/lib/openpy.py similarity index 100% rename from xonsh/openpy.py rename to xonsh/lib/openpy.py diff --git a/xonsh/tracer.py b/xonsh/tracer.py index 4e6034b38..74ffdf6a9 100644 --- a/xonsh/tracer.py +++ b/xonsh/tracer.py @@ -11,9 +11,9 @@ import typing as tp import xonsh.procs.pipelines as xpp import xonsh.prompt.cwd as prompt from xonsh.cli_utils import Annotated, Arg, ArgParserAlias -from xonsh.inspectors import find_file from xonsh.lazyasd import LazyObject from xonsh.lazyimps import pyghooks, pygments +from xonsh.lib.inspectors import find_file from xonsh.platform import HAS_PYGMENTS from xonsh.tools import DefaultNotGiven, normabspath, print_color, to_bool