+import builtins
import os
import sys
@dataclass(frozen=True, kw_only=True)
class FancyCompleter(ThemeSection):
# functions and methods
- function: str = ANSIColors.BOLD_BLUE
- builtin_function_or_method: str = ANSIColors.BOLD_BLUE
- method: str = ANSIColors.BOLD_CYAN
- method_wrapper: str = ANSIColors.BOLD_CYAN
- wrapper_descriptor: str = ANSIColors.BOLD_CYAN
- method_descriptor: str = ANSIColors.BOLD_CYAN
+ function: builtins.str = ANSIColors.BOLD_BLUE
+ builtin_function_or_method: builtins.str = ANSIColors.BOLD_BLUE
+ method: builtins.str = ANSIColors.BOLD_CYAN
+ method_wrapper: builtins.str = ANSIColors.BOLD_CYAN
+ wrapper_descriptor: builtins.str = ANSIColors.BOLD_CYAN
+ method_descriptor: builtins.str = ANSIColors.BOLD_CYAN
# numbers
- int: str = ANSIColors.BOLD_YELLOW
- float: str = ANSIColors.BOLD_YELLOW
- complex: str = ANSIColors.BOLD_YELLOW
- bool: str = ANSIColors.BOLD_YELLOW
+ int: builtins.str = ANSIColors.BOLD_YELLOW
+ float: builtins.str = ANSIColors.BOLD_YELLOW
+ complex: builtins.str = ANSIColors.BOLD_YELLOW
+ bool: builtins.str = ANSIColors.BOLD_YELLOW
# others
- type: str = ANSIColors.BOLD_MAGENTA
- module: str = ANSIColors.CYAN
- NoneType: str = ANSIColors.GREY
- bytes: str = ANSIColors.BOLD_GREEN
- str: str = ANSIColors.BOLD_GREEN
+ type: builtins.str = ANSIColors.BOLD_MAGENTA
+ module: builtins.str = ANSIColors.CYAN
+ NoneType: builtins.str = ANSIColors.GREY
+ bytes: builtins.str = ANSIColors.BOLD_GREEN
+ str: builtins.str = ANSIColors.BOLD_GREEN
@dataclass(frozen=True, kw_only=True)
import unittest
import unittest.mock
import _colorize
+from test.support import cpython_only, import_helper
from test.support.os_helper import EnvironmentVarGuard
return contextlib.nullcontext()
+class TestImportTime(unittest.TestCase):
+
+ @cpython_only
+ def test_lazy_import(self):
+ import_helper.ensure_lazy_imports(
+ "_colorize", {"copy", "re"}
+ )
+
+
class TestTheme(unittest.TestCase):
def test_attributes(self):