Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (128 loc) · 3.87 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (128 loc) · 3.87 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
[build-system]
requires = ["uv_build>=0.12.0,<0.13.0"]
build-backend = "uv_build"
[project]
name = "python-docx"
authors = [{name = "Steve Canny", email = "[email protected]"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Office/Business :: Office Suites",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"lxml>=5.4.0",
]
description = "Create, read, and update Microsoft Word .docx files."
keywords = ["docx", "office", "openxml", "word"]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.11"
version = "1.3.0"
[dependency-groups]
dev = [
"behave>=1.2.6",
"build>=1.2.2",
"pyparsing>=3.2.3",
"pyright>=1.1.401",
"pytest>=8.4.0",
"pytest-cov>=6.1.1",
"pytest-xdist>=3.7.0",
"ruff>=0.11.13",
"tox>=4.26.0",
"twine>=6.1.0",
"types-lxml-multi-subclass>=2025.3.30",
{include-group = "docs"},
]
docs = [
"Sphinx>=8.2.3",
]
[project.urls]
Changelog = "https://github.com/python-openxml/python-docx/blob/master/HISTORY.rst"
Documentation = "https://python-docx.readthedocs.org/en/latest/"
Homepage = "https://github.com/python-openxml/python-docx"
Repository = "https://github.com/python-openxml/python-docx"
[tool.pyright]
include = ["src/docx", "tests"]
pythonPlatform = "All"
pythonVersion = "3.11"
reportImportCycles = false
reportUnnecessaryCast = true
reportUnnecessaryTypeIgnoreComment = true
stubPath = "./typings"
typeCheckingMode = "strict"
verboseOutput = true
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
filterwarnings = [
# -- exit on any warning not explicitly ignored here --
"error",
# -- pytest-xdist plugin may warn about `looponfailroots` deprecation --
"ignore::DeprecationWarning:xdist",
# -- pytest complains when pytest-xdist is not installed --
"ignore:Unknown config option. looponfailroots:pytest.PytestConfigWarning",
]
looponfailroots = ["src", "tests"]
norecursedirs = [
"doc",
"docx",
"*.egg-info",
"features",
".git",
"ref",
"_scratch",
".tox",
]
python_files = ["test_*.py"]
python_classes = ["Test", "Describe"]
python_functions = ["it_", "its_", "they_", "and_", "but_"]
[tool.ruff]
exclude = []
line-length = 100
target-version = "py311"
[tool.ruff.lint]
ignore = [
"COM812", # -- over-aggressively insists on trailing commas where not desired --
"PT001", # -- wants @pytest.fixture() instead of @pytest.fixture --
]
select = [
"C4", # -- flake8-comprehensions --
"COM", # -- flake8-commas --
"E", # -- pycodestyle errors --
"F", # -- pyflakes --
"I", # -- isort (imports) --
"PLR0402", # -- Name compared with itself like `foo == foo` --
"PT", # -- flake8-pytest-style --
"SIM", # -- flake8-simplify --
"UP015", # -- redundant `open()` mode parameter (like "r" is default) --
"UP018", # -- Unnecessary {literal_type} call like `str("abc")`. (rewrite as a literal) --
"UP032", # -- Use f-string instead of `.format()` call --
"UP034", # -- Avoid extraneous parentheses --
]
[tool.ruff.lint.isort]
known-first-party = ["docx"]
known-local-folder = ["helpers"]
[tool.uv]
exclude-newer = "7 days"
[tool.uv.build-backend]
# -- distribution is `python-docx` but the importable module is `docx` --
module-name = "docx"
# -- uv_build ignores MANIFEST.in; these keep the sdist self-testable --
source-include = [
"HISTORY.rst",
"docs/**",
"features/**",
"requirements*.txt",
"tests/**",
"tox.ini",
]
source-exclude = ["docs/.build/**"]