-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathpyproject.toml
143 lines (127 loc) · 3.49 KB
/
pyproject.toml
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
[build-system]
build-backend = 'setuptools.build_meta'
requires = ['setuptools', 'setuptools-scm']
[project]
name = 'mt-940'
version = '4.30.0'
description = 'A library to parse MT940 files and returns smart Python collections for statistics and manipulation.'
authors = [
{ name = 'Rick van Hattem', email = '[email protected]' },
{ name = 'Rick van Hattem (wolph)', email = '[email protected]' },
]
dependencies = ['setuptools>=75.6.0']
requires-python = '>=3.9'
readme = 'README.rst'
license = { text = 'BSD' }
keywords = ['MT940']
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: PyPy',
]
[project.urls]
Homepage = 'https://github.com/WoLpH/mt940'
[project.optional-dependencies]
docs = ['GitPython>=2.1.9', 'sphinx2rst', 'sphinx>=1.7.2']
tests = [
'flake8',
'pytest',
'pytest-cache',
'pytest-cover',
'pytest-flake8',
'pyyaml',
'pyright',
'mypy',
'types-pyyaml',
]
[tool.setuptools]
platforms = ['any']
include-package-data = false
[tool.setuptools.dynamic]
version = { attr = 'mt940.__about__.__version__' }
[tool.setuptools.packages.find]
include = ['mt940']
[tool.setuptools.package-data]
mt940 = ['py.typed']
[dependency-groups]
dev = [
"basedpyright>=1.23.1",
'mt-940[docs,tests]',
"mypy>=1.14.1",
"pyright>=1.1.391",
"ruff>=0.8.4",
]
[tool.repo-review]
ignore = [
'PY004', # no /docs
'PY007', # tox configured in tox.toml
'PP301', # pytest is irrelevant
'PC111', # no blacken-docs because markdown has no code
'PC140', # manual typecheck pre-commit hooks
'PC170', # no pygrep-hooks because no rST
'RTD', # no RTD
]
[tool.codespell]
skip = '*/htmlcov,./docs/_build,*.asc,*.yml,*.sta,*.txt,*.html,./docs/html'
[tool.pyright]
include = ['mt940', 'mt940_tests']
exclude = ['dist/*', 'mt940_tests/*']
strict = [
'mt940/__about__.py',
'mt940/__init__.py',
'mt940/json.py',
'mt940/models.py',
'mt940/parser.py',
'mt940/processors.py',
'mt940/tags.py',
'mt940/utils.py',
]
[tool.mypy]
python_version = '3.9'
# We're partially mypy strict but mypy is a pain... just use (based)pyright
strict = false
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = false
packages = ['mt940', 'mt940_tests']
ignore_missing_imports = true
check_untyped_defs = true
exclude = ['dist', 'docs', '.venv', 'venv']
enable_error_code = ['ignore-without-code', 'truthy-bool', 'redundant-expr']
warn_unreachable = true
[tool.coverage.run]
branch = true
source = [
'mt940',
'mt940_tests',
]
omit = [
'*/mock/*',
'*/nose/*',
]
[tool.coverage.report]
fail_under = 100
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
'if (typing\.|)TYPE_CHECKING',
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
'def __repr__',
'@overload',
]