-
Notifications
You must be signed in to change notification settings - Fork 776
Expand file tree
/
Copy pathpyproject.toml
More file actions
171 lines (160 loc) · 4.39 KB
/
pyproject.toml
File metadata and controls
171 lines (160 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
[project]
name = "prompt_toolkit"
version = "3.0.52" # Also update in `docs/conf.py`.
description = "Library for building powerful interactive command lines in Python"
readme = "README.rst"
authors = [{ name = "Jonathan Slenders" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Free Threading :: 3 - Stable",
"Programming Language :: Python",
"Topic :: Software Development",
]
requires-python = ">=3.10"
dependencies = ["wcwidth>=0.1.4"]
[dependency-groups]
build = ["build>=1", "setuptools>=68"]
docs = [
"sphinx>=8,<9",
"wcwidth",
"pyperclip",
"sphinx_copybutton>=0.5.2,<1.0.0",
"sphinx-nefertiti>=0.8.8",
]
dev = [
"asyncssh",
"codecov>=2.1",
"coverage>=7.11",
"ipython>=8.23",
"mypy>=1.13",
"prek>=0.3.5",
"pytest>=8.1.1",
"pytest-cov>=5",
"pytest-mock>=3.14.1",
"ruff>=0.14.10",
"typos",
]
[project.urls]
Homepage = "https://github.com/prompt-toolkit/python-prompt-toolkit"
Documentation = "https://python-prompt-toolkit.readthedocs.io/en/stable/"
[tool.ruff]
target-version = "py310"
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"T", # Print.
"I", # isort
# "B", # flake8-bugbear
"UP", # pyupgrade
"RUF100", # unused-noqa
"Q", # quotes
]
lint.ignore = [
"E501", # Line too long, handled by black
"C901", # Too complex
"E731", # Assign lambda.
"E402", # Module level import not at the top.
"E741", # Ambiguous variable name.
]
[tool.ruff.lint.per-file-ignores]
"examples/*" = ["UP031", "T201"] # Print allowed in examples.
"src/prompt_toolkit/application/application.py" = [
"T100",
"T201",
"F821",
] # pdb and print allowed.
"src/prompt_toolkit/contrib/telnet/server.py" = ["T201"] # Print allowed.
"src/prompt_toolkit/key_binding/bindings/named_commands.py" = [
"T201",
] # Print allowed.
"src/prompt_toolkit/shortcuts/progress_bar/base.py" = ["T201"] # Print allowed.
"tools/*" = ["T201"] # Print allowed.
"src/prompt_toolkit/filters/__init__.py" = [
"F403",
"F405",
] # Possibly undefined due to star import.
"src/prompt_toolkit/filters/cli.py" = [
"F403",
"F405",
] # Possibly undefined due to star import.
"src/prompt_toolkit/shortcuts/progress_bar/formatters.py" = [
"UP031",
] # %-style formatting.
"src/*" = ["UP031", "UP032"] # f-strings instead of format calls.
[tool.ruff.lint.isort]
known-first-party = ["prompt_toolkit"]
known-third-party = ["pygments", "asyncssh"]
[tool.typos.default]
extend-ignore-re = [
"Formicidae",
"Iterm",
"goes",
"iterm",
"prepend",
"prepended",
"prev",
"ret",
"rouble",
"x1b\\[4m",
"Vertica", # Database.
# Deliberate spelling mistakes in autocorrection.py
"wolrd",
"impotr",
# Lorem ipsum.
"Nam",
"varius",
]
locale = 'en-us' # US English.
[tool.typos.files]
extend-exclude = [
"tests/test_buffer.py",
"tests/test_cli.py",
"tests/test_regular_languages.py",
# complains about some spelling in human right declaration.
"examples/prompts/multiline-autosuggest.py",
]
[tool.mypy]
# --strict.
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
exclude = [
"^.git/",
"^.venv/",
"^build/", # .build directory
"^docs/", # docs directory
"^dist/",
"^examples/", # examples directory
"^tests/", # tests directory
]
files = ['.']
ignore_missing_imports = true
no_implicit_optional = true
no_implicit_reexport = true
strict_equality = true
strict_optional = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.uv]
default-groups = ["build", "dev"]