-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (105 loc) · 3.26 KB
/
Copy pathpyproject.toml
File metadata and controls
125 lines (105 loc) · 3.26 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
[project]
name = "docx2python"
version = "3.7.1"
description = "Extract content from docx files"
authors = [{ name = "Shay Hill", email = "shay_public@hotmail.com" }]
license = "MIT"
license-files = ["LICENSE.txt"]
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"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",
"Typing :: Typed",
]
dependencies = [
"lxml>=6.1.1",
"paragraphs>=1.0.1",
"typing-extensions",
]
[build-system]
requires = ["uv_build>=0.11.25,<0.12.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"commitizen>=4.17.0",
"pre-commit>=4.6.1",
"pytest>=9.1.1",
"types-lxml>=2026.2.16",
]
[tool.commitizen]
name = "cz_conventional_commits"
version = "3.7.1"
tag_format = "$version"
major-version-zero = true
version_files = ["pyproject.toml:^version"]
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--doctest-modules"
pythonpath = "tests"
testpaths = ["tests"]
log_cli = true
[tool.ruff]
target-version = "py310"
exclude = ["typings", ".venv"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"S101",
"D",
"F401",
"SLF001", # private member access
"E501", # line too long
] # Ignore assertions, docstrings, unused imports in test files
[tool.ruff.format]
docstring-code-line-length = 88
skip-magic-trailing-comma = true
[tool.ruff.lint.isort]
# keep isort consistent with format.skip-magic-trailing-comma
split-on-trailing-comma = false
[tool.ruff.lint]
select = ["ALL"]
# only auto-fix __all__ sorting (RUF022) and import sorting (I)
fixable = ["RUF022", "I"]
ignore = [
"COM812", # trailing comma missing (does not agree with Black)
"D203", # 1 blank line before class docstring (incompatible with D211)
"D213", # multi-line summary second line (incompatible with D212)
"ISC003", # explicitly concatenated string should be implicit
"FLY", # Use f-string instead of ...
"S311", # Standard pseudo-random generators are not suitable for security/cryptographic purposes
"S301", # don't use pickle
"CPY001", # copyrite notice should be present in each file
"N802", # function name should be lowercase
"N803", # argument name should be lowercase
"N806", # variable in function should be lowercase
"D400", # First line of docstring should end with a period
"PLR2004", # magic number should be defined as a constant
"SIM108", # use ternary operator
]
[tool.pyright]
include = ["src", "tests"]
exclude = ["**/__pycache__.py"]
ignore = ["typings", ".venv"]
pythonVersion = "3.10"
pythonPlatform = "All"
typeCheckingMode = "strict"
reportCallInDefaultInitializer = true
reportImplicitStringConcatenation = true
reportPropertyTypeMismatch = true
reportUninitializedInstanceVariable = true
reportUnnecessaryTypeIgnoreComment = true
reportUnusedCallResult = true
venvPath = "."
venv = "./.venv"
[[tool.pyright.executionEnvironments]]
root = "tests"
extraPaths = ["."]