-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
190 lines (179 loc) · 3.28 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
182
183
184
185
186
187
188
189
190
[tool.poetry]
name = "ckip2tei"
version = "1.1.3"
description = "A Python package that asynchronously segments JSON data into TEI XML format."
authors = ["Retr0327"]
readme = "README.md"
packages = [{include = "ckip2tei"}]
[tool.poetry.dependencies]
python = "^3.10"
ckip-transformers = "^0.3.4"
pydantic = "^2.7.0"
pydantic-settings = "^2.2.1"
[tool.poetry.group.dev.dependencies]
black = "^24.4.0"
ruff = "^0.3.7"
pre-commit = "^3.7.0"
vulture = "^2.11"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.vulture]
min_confidence = 80
paths = ["ckip2tei"]
sort_by_size = true
[tool.isort]
profile = "black"
combine_as_imports = true
force_grid_wrap = 2
force_sort_within_sections = true
[tool.black]
exclude = '''
(
\.git
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| _build
| build
| dist
| setup.py
)
'''
[tool.ruff]
line-length = 88
# Python version: 3.11
target-version = "py311"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle
"E", "W",
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# flake8-debugger
"T10",
# flake8-gettext
"INT",
# pylint
"PL",
# flake8-pytest-style
"PT",
# misc lints
"PIE",
# flake8-pyi
"PYI",
# tidy imports
"TID",
# implicit string concatenation
"ISC",
# type-checking imports
"TCH",
# comprehensions
"C4",
# pygrep-hooks
"PGH",
# Ruff-specific rules
"RUF",
# flake8-bandit: exec-builtin
"S102",
# numpy-legacy-random
"NPY002",
# Perflint
"PERF",
# flynt
"FLY",
# flake8-logging-format
"G",
# flake8-future-annotations
"FA",
]
ignore = [
"ISC001",
# module level import not at top of file
"E402",
# do not assign a lambda expression, use a def
"E731",
# controversial
"B006",
# controversial
"B007",
# controversial
"B008",
# setattr is used to side-step mypy
"B009",
# getattr is used to side-step mypy
"B010",
# tests use assert False
"B011",
# tests use comparisons but not their returned value
"B015",
# false positives
"B019",
# Loop control variable overrides iterable it iterates
"B020",
# Function definition does not bind loop variable
"B023",
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Global statements are discouraged
"PLW0603",
# Docstrings should not be included in stubs
"PYI021",
# Additional checks that don't pass yet
# Within an except clause, raise exceptions with ...
"B904",
# Magic number
"PLR2004",
# Consider `elif` instead of `else` then `if` to remove indentation level
"PLR5501",
# Wildcard (star) import
"F403",
"F405",
# Type inference check
"TCH001",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
fixable = ["ALL"]