mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
refactoring: move lazy to lib (#5560)
#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>
This commit is contained in:
parent
143042aff5
commit
2788ae3308
52 changed files with 59 additions and 59 deletions
|
@ -14,7 +14,7 @@ from xonsh.history.json import (
|
||||||
_xhj_gc_seconds_to_rmfiles,
|
_xhj_gc_seconds_to_rmfiles,
|
||||||
)
|
)
|
||||||
from xonsh.history.main import HistoryAlias, history_main
|
from xonsh.history.main import HistoryAlias, history_main
|
||||||
from xonsh.lazyjson import LazyJSON
|
from xonsh.lib.lazyjson import LazyJSON
|
||||||
|
|
||||||
CMDS = ["ls", "cat hello kitty", "abc", "def", "touch me", "grep from me"]
|
CMDS = ["ls", "cat hello kitty", "abc", "def", "touch me", "grep from me"]
|
||||||
IGNORE_OPTS = ",".join(["ignoredups", "ignoreerr", "ignorespace"])
|
IGNORE_OPTS = ",".join(["ignoredups", "ignoreerr", "ignorespace"])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Tests lazy and self destruictive objects."""
|
"""Tests lazy and self destruictive objects."""
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
|
|
||||||
#
|
#
|
||||||
# LazyObject Tests
|
# LazyObject Tests
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
from xonsh.lazyjson import LazyJSON, LJNode, index, ljdump
|
from xonsh.lib.lazyjson import LazyJSON, LJNode, index, ljdump
|
||||||
|
|
||||||
|
|
||||||
def test_index_int():
|
def test_index_int():
|
||||||
|
|
|
@ -328,7 +328,7 @@ def test_colorize_file_symlink(key, file_path, colorizable_files, xs_LS_COLORS):
|
||||||
assert color_key == tar_color_key, "File classified as expected kind, via symlink"
|
assert color_key == tar_color_key, "File classified as expected kind, via symlink"
|
||||||
|
|
||||||
|
|
||||||
import xonsh.lazyimps
|
import xonsh.lib.lazyimps
|
||||||
|
|
||||||
|
|
||||||
def test_colorize_file_ca(xs_LS_COLORS, monkeypatch):
|
def test_colorize_file_ca(xs_LS_COLORS, monkeypatch):
|
||||||
|
|
|
@ -19,7 +19,7 @@ from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
|
||||||
from xonsh.dirstack import _get_cwd, cd, dirs, popd, pushd
|
from xonsh.dirstack import _get_cwd, cd, dirs, popd, pushd
|
||||||
from xonsh.environ import locate_binary, make_args_env
|
from xonsh.environ import locate_binary, make_args_env
|
||||||
from xonsh.foreign_shells import foreign_shell_data
|
from xonsh.foreign_shells import foreign_shell_data
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers.ast import isexpression
|
from xonsh.parsers.ast import isexpression
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
IN_APPIMAGE,
|
IN_APPIMAGE,
|
||||||
|
|
|
@ -16,7 +16,7 @@ from xonsh.color_tools import (
|
||||||
short_to_ints,
|
short_to_ints,
|
||||||
warn_deprecated_no_color,
|
warn_deprecated_no_color,
|
||||||
)
|
)
|
||||||
from xonsh.lazyasd import LazyDict, lazyobject
|
from xonsh.lib.lazyasd import LazyDict, lazyobject
|
||||||
from xonsh.platform import HAS_PYGMENTS
|
from xonsh.platform import HAS_PYGMENTS
|
||||||
from xonsh.tools import FORMATTER
|
from xonsh.tools import FORMATTER
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ import types
|
||||||
import warnings
|
import warnings
|
||||||
from ast import AST
|
from ast import AST
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
|
||||||
from xonsh.lib.inspectors import Inspector
|
from xonsh.lib.inspectors import Inspector
|
||||||
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import ON_POSIX
|
from xonsh.platform import ON_POSIX
|
||||||
from xonsh.tools import (
|
from xonsh.tools import (
|
||||||
XonshCalledProcessError,
|
XonshCalledProcessError,
|
||||||
|
|
|
@ -7,7 +7,7 @@ import sys
|
||||||
|
|
||||||
from xonsh import __version__ as XONSH_VERSION
|
from xonsh import __version__ as XONSH_VERSION
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import PYTHON_VERSION_INFO_BYTES
|
from xonsh.platform import PYTHON_VERSION_INFO_BYTES
|
||||||
from xonsh.tools import is_writable_file, print_warning
|
from xonsh.tools import is_writable_file, print_warning
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ WTFPL http://sam.zoy.org/wtfpl/
|
||||||
import math
|
import math
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyObject, lazyobject
|
||||||
from xonsh.tools import print_warning
|
from xonsh.tools import print_warning
|
||||||
|
|
||||||
_NO_COLOR_WARNING_SHOWN = False
|
_NO_COLOR_WARNING_SHOWN = False
|
||||||
|
|
|
@ -14,7 +14,7 @@ import time
|
||||||
import typing as tp
|
import typing as tp
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import ON_POSIX, ON_WINDOWS, pathbasename
|
from xonsh.platform import ON_POSIX, ON_WINDOWS, pathbasename
|
||||||
from xonsh.tools import executables_in
|
from xonsh.tools import executables_in
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ from xonsh.completers.tools import (
|
||||||
contextual_completer,
|
contextual_completer,
|
||||||
get_filter_function,
|
get_filter_function,
|
||||||
)
|
)
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers.completion_context import CompletionContext
|
from xonsh.parsers.completion_context import CompletionContext
|
||||||
|
|
||||||
_suffixes = all_suffixes()
|
_suffixes = all_suffixes()
|
||||||
|
|
|
@ -3,7 +3,7 @@ import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
|
|
|
@ -6,7 +6,7 @@ import inspect
|
||||||
import re
|
import re
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.completers.tools import (
|
from xonsh.completers.tools import (
|
||||||
|
|
|
@ -10,7 +10,7 @@ from functools import wraps
|
||||||
|
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers.completion_context import CommandContext, CompletionContext
|
from xonsh.parsers.completion_context import CommandContext, CompletionContext
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ from xonsh.built_ins import XSH
|
||||||
from xonsh.codecache import run_script_with_cache
|
from xonsh.codecache import run_script_with_cache
|
||||||
from xonsh.dirstack import _get_cwd
|
from xonsh.dirstack import _get_cwd
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyasd import LazyBool, lazyobject
|
from xonsh.lib.lazyasd import LazyBool, lazyobject
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
BASH_COMPLETIONS_DEFAULT,
|
BASH_COMPLETIONS_DEFAULT,
|
||||||
DEFAULT_ENCODING,
|
DEFAULT_ENCODING,
|
||||||
|
|
|
@ -11,7 +11,7 @@ import tempfile
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import ON_CYGWIN, ON_MSYS, ON_WINDOWS
|
from xonsh.platform import ON_CYGWIN, ON_MSYS, ON_WINDOWS
|
||||||
from xonsh.tools import ensure_string, to_bool
|
from xonsh.tools import ensure_string, to_bool
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import difflib
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
from xonsh.color_tools import COLORS
|
from xonsh.color_tools import COLORS
|
||||||
from xonsh.lazyjson import LazyJSON
|
from xonsh.lib.lazyjson import LazyJSON
|
||||||
|
|
||||||
# intern some strings
|
# intern some strings
|
||||||
REPLACE_S = "replace"
|
REPLACE_S = "replace"
|
||||||
|
|
|
@ -19,7 +19,7 @@ except ImportError:
|
||||||
|
|
||||||
JSONDecodeError = json.decoder.JSONDecodeError # type: ignore
|
JSONDecodeError = json.decoder.JSONDecodeError # type: ignore
|
||||||
|
|
||||||
import xonsh.lazyjson as xlj
|
import xonsh.lib.lazyjson as xlj
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
import xonsh.xoreutils.uptime as uptime
|
import xonsh.xoreutils.uptime as uptime
|
||||||
from xonsh.history.base import History
|
from xonsh.history.base import History
|
||||||
|
|
|
@ -15,7 +15,7 @@ from importlib.machinery import ModuleSpec
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.execer import Execer
|
from xonsh.execer import Execer
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import ON_WINDOWS
|
from xonsh.platform import ON_WINDOWS
|
||||||
from xonsh.tools import print_warning
|
from xonsh.tools import print_warning
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.lazyimps import pyghooks, pygments
|
from xonsh.lib.lazyimps import pyghooks, pygments
|
||||||
from xonsh.lib.openpy import read_py_file
|
from xonsh.lib.openpy import read_py_file
|
||||||
from xonsh.lib.tokenize import detect_encoding
|
from xonsh.lib.tokenize import detect_encoding
|
||||||
from xonsh.platform import HAS_PYGMENTS
|
from xonsh.platform import HAS_PYGMENTS
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyObject, lazyobject
|
||||||
from xonsh.platform import ON_DARWIN, ON_WINDOWS
|
from xonsh.platform import ON_DARWIN, ON_WINDOWS
|
||||||
|
|
||||||
pygments = LazyObject(
|
pygments = LazyObject(
|
|
@ -15,7 +15,7 @@ This file was forked from the IPython project:
|
||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.lib.tokenize import detect_encoding, tokopen
|
from xonsh.lib.tokenize import detect_encoding, tokopen
|
||||||
|
|
||||||
cookie_comment_re = LazyObject(
|
cookie_comment_re = LazyObject(
|
||||||
|
|
|
@ -86,7 +86,7 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyObject, lazyobject
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"pretty",
|
"pretty",
|
||||||
|
|
|
@ -81,7 +81,7 @@ from token import (
|
||||||
tok_name,
|
tok_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.platform import PYTHON_VERSION_INFO
|
from xonsh.platform import PYTHON_VERSION_INFO
|
||||||
|
|
||||||
cookie_re = LazyObject(
|
cookie_re = LazyObject(
|
||||||
|
|
|
@ -17,8 +17,8 @@ from xonsh.environ import get_home_xonshrc_path, make_args_env, xonshrc_context
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.execer import Execer
|
from xonsh.execer import Execer
|
||||||
from xonsh.imphooks import install_import_hooks
|
from xonsh.imphooks import install_import_hooks
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.lazyimps import pyghooks, pygments
|
from xonsh.lib.lazyimps import pyghooks, pygments
|
||||||
from xonsh.lib.pretty import pretty
|
from xonsh.lib.pretty import pretty
|
||||||
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
|
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
|
||||||
from xonsh.procs.jobs import ignore_sigtstp
|
from xonsh.procs.jobs import ignore_sigtstp
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Implements the xonsh parser."""
|
"""Implements the xonsh parser."""
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.platform import PYTHON_VERSION_INFO
|
from xonsh.platform import PYTHON_VERSION_INFO
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ from ast import parse as pyparse
|
||||||
from collections.abc import Iterable, Mapping, Sequence
|
from collections.abc import Iterable, Mapping, Sequence
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.lib.tokenize import SearchPath, StringPrefix
|
from xonsh.lib.tokenize import SearchPath, StringPrefix
|
||||||
from xonsh.parsers import ast
|
from xonsh.parsers import ast
|
||||||
from xonsh.parsers.ast import has_elts, load_attribute_chain, xonsh_call
|
from xonsh.parsers.ast import has_elts, load_attribute_chain, xonsh_call
|
||||||
|
|
|
@ -17,7 +17,7 @@ from typing import (
|
||||||
overload,
|
overload,
|
||||||
)
|
)
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers.base import Location, raise_parse_error
|
from xonsh.parsers.base import Location, raise_parse_error
|
||||||
from xonsh.parsers.lexer import Lexer
|
from xonsh.parsers.lexer import Lexer
|
||||||
from xonsh.parsers.ply import yacc
|
from xonsh.parsers.ply import yacc
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import re
|
import re
|
||||||
from ast import parse as pyparse
|
from ast import parse as pyparse
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers import ast
|
from xonsh.parsers import ast
|
||||||
from xonsh.platform import PYTHON_VERSION_INFO
|
from xonsh.platform import PYTHON_VERSION_INFO
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import keyword as kwmod
|
||||||
import re
|
import re
|
||||||
import typing as tp
|
import typing as tp
|
||||||
|
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.lib.tokenize import (
|
from xonsh.lib.tokenize import (
|
||||||
CASE,
|
CASE,
|
||||||
COMMENT,
|
COMMENT,
|
||||||
|
|
|
@ -14,7 +14,7 @@ import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from xonsh.lazyasd import LazyBool, lazybool, lazyobject
|
from xonsh.lib.lazyasd import LazyBool, lazybool, lazyobject
|
||||||
|
|
||||||
# do not import any xonsh-modules here to avoid circular dependencies
|
# do not import any xonsh-modules here to avoid circular dependencies
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,9 @@ from ctypes.wintypes import (
|
||||||
WORD,
|
WORD,
|
||||||
)
|
)
|
||||||
|
|
||||||
from xonsh import lazyimps, platform
|
from xonsh import platform
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib import lazyimps
|
||||||
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
|
|
||||||
__all__ = ("sudo",)
|
__all__ = ("sudo",)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import typing as tp
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
|
from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
|
||||||
from xonsh.completers.tools import RichCompletion
|
from xonsh.completers.tools import RichCompletion
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.platform import FD_STDERR, LIBC, ON_CYGWIN, ON_DARWIN, ON_MSYS, ON_WINDOWS
|
from xonsh.platform import FD_STDERR, LIBC, ON_CYGWIN, ON_DARWIN, ON_MSYS, ON_WINDOWS
|
||||||
from xonsh.tools import get_signal_name, on_main_thread, unthreadable
|
from xonsh.tools import get_signal_name, on_main_thread, unthreadable
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
import xonsh.procs.jobs as xj
|
import xonsh.procs.jobs as xj
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
|
|
|
@ -9,8 +9,8 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
import xonsh.lazyimps as xli
|
import xonsh.lib.lazyimps as xli
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
|
|
|
@ -16,7 +16,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import xonsh.lazyimps as xli
|
import xonsh.lib.lazyimps as xli
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import xonsh.lazyimps as xli
|
import xonsh.lib.lazyimps as xli
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import xonsh.environ as xenv
|
import xonsh.environ as xenv
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
import xonsh.lazyimps as xli
|
import xonsh.lib.lazyimps as xli
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
import xonsh.procs.jobs as xj
|
import xonsh.procs.jobs as xj
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
|
|
|
@ -12,7 +12,7 @@ import threading
|
||||||
|
|
||||||
import xonsh.tools as xt
|
import xonsh.tools as xt
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
|
|
||||||
RE_REMOVE_ANSI = LazyObject(
|
RE_REMOVE_ANSI = LazyObject(
|
||||||
lambda: re.compile(r"(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]"),
|
lambda: re.compile(r"(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]"),
|
||||||
|
|
|
@ -40,8 +40,8 @@ from xonsh.color_tools import (
|
||||||
)
|
)
|
||||||
from xonsh.commands_cache import CommandsCache
|
from xonsh.commands_cache import CommandsCache
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyasd import LazyDict, LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyDict, LazyObject, lazyobject
|
||||||
from xonsh.lazyimps import html, os_listxattr, terminal256
|
from xonsh.lib.lazyimps import html, os_listxattr, terminal256
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
os_environ,
|
os_environ,
|
||||||
ptk_version_info,
|
ptk_version_info,
|
||||||
|
|
|
@ -17,7 +17,7 @@ from xonsh.codecache import (
|
||||||
)
|
)
|
||||||
from xonsh.completer import Completer
|
from xonsh.completer import Completer
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyimps import pyghooks, pygments
|
from xonsh.lib.lazyimps import pyghooks, pygments
|
||||||
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
|
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS
|
||||||
from xonsh.prompt.base import PromptFormatter, multiline_prompt
|
from xonsh.prompt.base import PromptFormatter, multiline_prompt
|
||||||
from xonsh.shells.shell import transform_command
|
from xonsh.shells.shell import transform_command
|
||||||
|
|
|
@ -26,7 +26,7 @@ from prompt_toolkit.styles.pygments import pygments_token_to_classname
|
||||||
|
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyimps import pyghooks, pygments, winutils
|
from xonsh.lib.lazyimps import pyghooks, pygments, winutils
|
||||||
from xonsh.platform import HAS_PYGMENTS, ON_POSIX, ON_WINDOWS
|
from xonsh.platform import HAS_PYGMENTS, ON_POSIX, ON_WINDOWS
|
||||||
from xonsh.pygments_cache import get_all_styles
|
from xonsh.pygments_cache import get_all_styles
|
||||||
from xonsh.shells.base_shell import BaseShell
|
from xonsh.shells.base_shell import BaseShell
|
||||||
|
|
|
@ -28,8 +28,8 @@ from xonsh.ansi_colors import (
|
||||||
)
|
)
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyasd import LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyObject, lazyobject
|
||||||
from xonsh.lazyimps import pyghooks, pygments, winutils
|
from xonsh.lib.lazyimps import pyghooks, pygments, winutils
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
ON_CYGWIN,
|
ON_CYGWIN,
|
||||||
ON_DARWIN,
|
ON_DARWIN,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from xonsh.color_tools import RE_BACKGROUND, iscolor, warn_deprecated_no_color
|
from xonsh.color_tools import RE_BACKGROUND, iscolor, warn_deprecated_no_color
|
||||||
from xonsh.lazyasd import LazyObject
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
from xonsh.platform import HAS_PYGMENTS
|
from xonsh.platform import HAS_PYGMENTS
|
||||||
from xonsh.tools import FORMATTER
|
from xonsh.tools import FORMATTER
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,7 @@ import timeit
|
||||||
|
|
||||||
from xonsh.built_ins import XSH
|
from xonsh.built_ins import XSH
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.lazyasd import lazybool, lazyobject
|
from xonsh.lib.lazyasd import lazybool, lazyobject
|
||||||
from xonsh.platform import ON_WINDOWS
|
|
||||||
|
|
||||||
|
|
||||||
@lazybool
|
@lazybool
|
||||||
|
|
|
@ -44,7 +44,7 @@ from contextlib import contextmanager
|
||||||
# adding imports from further xonsh modules is discouraged to avoid circular
|
# adding imports from further xonsh modules is discouraged to avoid circular
|
||||||
# dependencies
|
# dependencies
|
||||||
from xonsh import __version__
|
from xonsh import __version__
|
||||||
from xonsh.lazyasd import LazyDict, LazyObject, lazyobject
|
from xonsh.lib.lazyasd import LazyDict, LazyObject, lazyobject
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
DEFAULT_ENCODING,
|
DEFAULT_ENCODING,
|
||||||
HAS_PYGMENTS,
|
HAS_PYGMENTS,
|
||||||
|
|
|
@ -11,9 +11,9 @@ import typing as tp
|
||||||
import xonsh.procs.pipelines as xpp
|
import xonsh.procs.pipelines as xpp
|
||||||
import xonsh.prompt.cwd as prompt
|
import xonsh.prompt.cwd as prompt
|
||||||
from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
|
from xonsh.cli_utils import Annotated, Arg, ArgParserAlias
|
||||||
from xonsh.lazyasd import LazyObject
|
|
||||||
from xonsh.lazyimps import pyghooks, pygments
|
|
||||||
from xonsh.lib.inspectors import find_file
|
from xonsh.lib.inspectors import find_file
|
||||||
|
from xonsh.lib.lazyasd import LazyObject
|
||||||
|
from xonsh.lib.lazyimps import pyghooks, pygments
|
||||||
from xonsh.platform import HAS_PYGMENTS
|
from xonsh.platform import HAS_PYGMENTS
|
||||||
from xonsh.tools import DefaultNotGiven, normabspath, print_color, to_bool
|
from xonsh.tools import DefaultNotGiven, normabspath, print_color, to_bool
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from xonsh.built_ins import XSH
|
||||||
from xonsh.cli_utils import Arg, ArgParserAlias
|
from xonsh.cli_utils import Arg, ArgParserAlias
|
||||||
from xonsh.events import events
|
from xonsh.events import events
|
||||||
from xonsh.foreign_shells import CANON_SHELL_NAMES
|
from xonsh.foreign_shells import CANON_SHELL_NAMES
|
||||||
from xonsh.lazyasd import lazyobject
|
from xonsh.lib.lazyasd import lazyobject
|
||||||
from xonsh.parsers import ply
|
from xonsh.parsers import ply
|
||||||
from xonsh.platform import (
|
from xonsh.platform import (
|
||||||
DEFAULT_ENCODING,
|
DEFAULT_ENCODING,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import xonsh.lazyasd as xl
|
import xonsh.lib.lazyasd as xl
|
||||||
|
|
||||||
|
|
||||||
@xl.lazyobject
|
@xl.lazyobject
|
||||||
|
|
|
@ -19,7 +19,7 @@ import struct
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import xonsh.lazyimps as xlimps
|
import xonsh.lib.lazyimps as xlimps
|
||||||
import xonsh.platform as xp
|
import xonsh.platform as xp
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue