Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/wcwidth/wcwidth.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2Legacy compatibility module for wcwidth.wcwidth.
4This file contains no new definitions and is provided only for backwards compatibility. This module
5exists solely to support legacy "absolute" import paths, when this module published everything under
6this single file, 'wcwidth'::
8 from wcwidth.wcwidth import wcswidth
9 import wcwidth.wcwidth as wc_module
10"""
11# pylint: disable=unused-import
13__lazy_modules__ = [
14 "wcwidth._clip",
15 "wcwidth._constants",
16 "wcwidth._wcswidth",
17 "wcwidth._wcwidth",
18 "wcwidth._width",
19 "wcwidth.align",
20 "wcwidth.bisearch",
21 "wcwidth.control_codes",
22 "wcwidth.escape_sequences",
23 "wcwidth.grapheme",
24 "wcwidth.sgr_state",
25 "wcwidth.table_ambiguous",
26 "wcwidth.table_grapheme",
27 "wcwidth.table_mc",
28 "wcwidth.table_vs16",
29 "wcwidth.table_wide",
30 "wcwidth.table_zero",
31 "wcwidth.unicode_versions",
32]
34# local
35from ._clip import clip
36from .align import ljust, rjust, center
37from ._width import _CONTROL_CHAR_TABLE, _WIDTH_FAST_PATH_MIN_LEN, width, _width_ignored_codes
38from ._wcwidth import wcwidth, _wcmatch_version, _wcversion_value
39from .bisearch import bisearch as _bisearch
40from .grapheme import iter_graphemes
41from .table_mc import CATEGORY_MC
42from ._wcswidth import wcswidth, wcstwidth
43from .sgr_state import (_SGR_PATTERN,
44 _SGR_STATE_DEFAULT,
45 _sgr_state_update,
46 _sgr_state_is_active,
47 _sgr_state_to_sequence)
48from ._constants import (_EMOJI_ZWJ_SET,
49 _ISC_VIRAMA_SET,
50 _LATEST_VERSION,
51 _AMBIGUOUS_TABLE,
52 _ZERO_WIDTH_TABLE,
53 _CATEGORY_MC_TABLE,
54 _FITZPATRICK_RANGE,
55 _WIDE_EASTASIAN_TABLE,
56 _REGIONAL_INDICATOR_SET)
57from .table_vs16 import VS16_NARROW_TO_WIDE
58from .table_wide import WIDE_EASTASIAN
59from .table_zero import ZERO_WIDTH
60from .control_codes import ILLEGAL_CTRL, VERTICAL_CTRL, HORIZONTAL_CTRL, ZERO_WIDTH_CTRL
61from .table_ambiguous import AMBIGUOUS_EASTASIAN
62from .escape_sequences import (ZERO_WIDTH_PATTERN,
63 CURSOR_LEFT_SEQUENCE,
64 CURSOR_RIGHT_SEQUENCE,
65 INDETERMINATE_EFFECT_SEQUENCE,
66 iter_sequences,
67 strip_sequences)
68from .unicode_versions import list_versions
70__all__ = (
71 'ZERO_WIDTH',
72 'WIDE_EASTASIAN',
73 'AMBIGUOUS_EASTASIAN',
74 'VS16_NARROW_TO_WIDE',
75 'list_versions',
76 'wcwidth',
77 'wcswidth',
78 'wcstwidth',
79 'width',
80 'iter_sequences',
81 'ljust',
82 'rjust',
83 'center',
84 'clip',
85 'strip_sequences',
86 '_wcmatch_version',
87 '_wcversion_value',
88)