-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
182 lines (158 loc) · 4.07 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
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
172
173
174
175
176
177
178
179
180
181
[build-system]
requires = ["setuptools==69.1.1", "wheel~=0.42.0", "toml"]
build-backend = "setuptools.build_meta"
[project]
name = "pyesef"
version = "1.0.2"
license = {text = "MIT"}
description = "Parse financial statements in XBRL format"
authors = [
{name = "ggravlingen", email = "no@email.com"}
]
keywords = ["esef", "statement", "financial"]
requires-python = ">=3.11.0"
classifiers=[
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Financial and Insurance Industry",
]
dependencies = [
"arelle-release==2.31.4",
"colorlog==6.9.0",
"lxml==5.3.0",
"pandas==2.2.3",
"requests==2.32.3",
"tinycss2==1.4.0",
]
[project.optional-dependencies]
dev = [
"black==24.10.0",
"coverage==7.6.1",
"mypy==1.13.0",
"pre-commit==4.0.1",
"pylint==3.3.1",
"pytest==8.3.3",
"pytest-cov==6.0.0",
"pandas-stubs==2.2.3.241009",
"pytest-timeout==2.3.1",
"ruff==0.7.1",
"types-openpyxl==3.1.5.20241025",
"types-requests==2.32.0.20241016",
]
[tool.setuptools]
platforms = ["any"]
zip-safe = false
include-package-data = true
[tool.setuptools.packages.find]
include = ["pyesef", "pyesef.*"]
exclude = ["script", "tests"]
[tool.setuptools.package-data]
"pyesef" = ["py.typed", "static/statement_definition.json"]
[tool.black]
target-version = ["py311"]
[tool.pylint.MASTER]
py-version = "3.11"
[tool.pylint.BASIC]
class-const-naming-style = "any"
[tool.pylint."MESSAGES CONTROL"]
disable = [
"broad-except",
"too-many-instance-attributes",
"too-many-return-statements",
"too-few-public-methods",
"too-many-locals",
# It's easier to use f-string than lazy % formatting
"logging-fstring-interpolation",
"too-many-branches",
"too-many-arguments",
]
[tool.pylint.REPORTS]
score = false
[tool.pylint.FORMAT]
expected-line-ending-format = "LF"
[tool.pylint.EXCEPTIONS]
overgeneral-exceptions = [
"builtins.BaseException",
"builtins.Exception",
]
[tool.pylint.TYPING]
[tool.pytest.ini_options]
testpaths = [
"tests",
]
norecursedirs = [
".git",
"testing_config",
]
[tool.ruff]
exclude = []
target-version = "py311"
lint.select = [
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"C", # complexity
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"I", # isort
"ICN001", # import concentions; {name} should be imported as {asname}
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"T20", # flake8-print
"UP", # pyupgrade
"W", # pycodestyle
]
# Same as Black.
line-length = 88
lint.ignore = [
# One of these is to be disabled..
"D213", # See https://github.com/charliermarsh/ruff/issues/2281
#"D212", # See https://github.com/charliermarsh/ruff/issues/2281
"D203", # See https://github.com/charliermarsh/ruff/issues/2281
#"D211", # See https://github.com/charliermarsh/ruff/issues/2281
# keep-runtime-annotations
'UP006', # Non PEP585 annotations
'UP007', # Non PEP604 annotations
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.pydocstyle]
convention = 'pep257'
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = true
forced-separate = [
"tests",
]
known-first-party = [
"pyesef",
"tests",
]
[tools.mypy]
python_version = "3.11"
show_error_codes = true
follow_imports = "silent"
ignore_missing_imports = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_unreachable = true
strict = true
[[tool.mypy.overrides]]
module = [
"arelle.*",
"jstyleson.*",
]
ignore_missing_imports = true