Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/prompt_toolkit/__init__.py: 100%
10 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-20 06:09 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-20 06:09 +0000
1"""
2prompt_toolkit
3==============
5Author: Jonathan Slenders
7Description: prompt_toolkit is a Library for building powerful interactive
8 command lines in Python. It can be a replacement for GNU
9 Readline, but it can be much more than that.
11See the examples directory to learn about the usage.
13Probably, to get started, you might also want to have a look at
14`prompt_toolkit.shortcuts.prompt`.
15"""
16from __future__ import annotations
18import re
20# note: this is a bit more lax than the actual pep 440 to allow for a/b/rc/dev without a number
21pep440 = re.compile(
22 r"^([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*)?)?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*)?)?$",
23 re.UNICODE,
24)
25from .application import Application
26from .formatted_text import ANSI, HTML
27from .shortcuts import PromptSession, print_formatted_text, prompt
29# Don't forget to update in `docs/conf.py`!
30__version__ = "3.0.43"
32assert pep440.match(__version__)
34# Version tuple.
35VERSION = tuple(int(v.rstrip("abrc")) for v in __version__.split(".")[:3])
38__all__ = [
39 # Application.
40 "Application",
41 # Shortcuts.
42 "prompt",
43 "PromptSession",
44 "print_formatted_text",
45 # Formatted text.
46 "HTML",
47 "ANSI",
48 # Version info.
49 "__version__",
50 "VERSION",
51]