__init__.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. """
  2. Wcwidth module.
  3. https://github.com/jquast/wcwidth
  4. """
  5. # re-export all functions & definitions, even private ones, from top-level
  6. # module path, to allow for 'from wcwidth import _private_func'. Of course,
  7. # user beware that any _private functions or variables not exported by __all__
  8. # may disappear or change signature at any future version.
  9. # local
  10. from .wcwidth import ZERO_WIDTH # noqa
  11. from .wcwidth import (WIDE_EASTASIAN,
  12. AMBIGUOUS_EASTASIAN,
  13. VS16_NARROW_TO_WIDE,
  14. clip,
  15. ljust,
  16. rjust,
  17. width,
  18. center,
  19. wcwidth,
  20. wcswidth,
  21. list_versions,
  22. iter_sequences,
  23. strip_sequences,
  24. _wcmatch_version,
  25. _wcversion_value)
  26. from .bisearch import bisearch as _bisearch
  27. from .grapheme import grapheme_boundary_before # noqa
  28. from .grapheme import iter_graphemes, iter_graphemes_reverse
  29. from .textwrap import SequenceTextWrapper, wrap
  30. from .sgr_state import propagate_sgr
  31. # The __all__ attribute defines the items exported from statement,
  32. # 'from wcwidth import *', but also to say, "This is the public API".
  33. __all__ = ('wcwidth', 'wcswidth', 'width', 'iter_sequences', 'iter_graphemes',
  34. 'iter_graphemes_reverse', 'grapheme_boundary_before',
  35. 'ljust', 'rjust', 'center', 'wrap', 'clip', 'strip_sequences',
  36. 'list_versions', 'propagate_sgr')
  37. # Using 'hatchling', it does not seem to provide the pyproject.toml nicety, "dynamic = ['version']"
  38. # like flit_core, maybe there is some better way but for now we have to duplicate it in both places
  39. __version__ = '0.6.0'