forked from dosisod/refurb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
134 lines (114 loc) · 2.76 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
[tool.poetry]
name = "refurb"
version = "2.0.0"
description = "A tool for refurbishing and modernizing Python codebases"
authors = ["dosisod"]
license = "GPL-3.0-only"
readme = "README.md"
repository = "https://github.com/dosisod/refurb"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Software Development :: Testing",
"Typing :: Typed"
]
[tool.poetry.dependencies]
python = ">=3.10"
mypy = ">=0.981"
tomli = {version = "^2.0.1", python = "<3.11"}
[tool.poetry.dev-dependencies]
black = "^22.6.0"
isort = "^5.10.1"
pytest = "^7.1.2"
[tool.poetry.scripts]
refurb = "refurb.__main__:main"
[tool.isort]
line_length = 99
multi_line_output = 3
include_trailing_comma = true
color_output = true
extend_skip = ["test/data"]
[tool.mypy]
allow_redefinition = true
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_unimported = true
namespace_packages = true
pretty = true
strict = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = "test.*"
allow_untyped_defs = true
[tool.coverage.run]
omit = [
"refurb/__main__.py",
"refurb/gen.py",
"refurb/visitor/traverser.py"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"assert False",
]
skip_covered = true
skip_empty = true
[tool.black]
exclude = "test/data/*"
line-length = 99
color = true
[tool.pytest.ini_options]
addopts = "--cov=refurb --cov-report=html --cov-report=term-missing --cov-fail-under=100"
testpaths = ["test"]
[tool.ruff]
line-length = 99
preview = true
lint.select = ["ALL"]
# TODO: fix RUF100 not playing well with refurb
lint.extend-ignore = [
"A001", "A002", "A003",
"ANN101", "ANN102", "ANN401", "ARG001",
"B905",
"C901",
"COM812",
"D100", "D101", "D102", "D103", "D104", "D105", "D107", "D200", "D202", "D203",
"D205", "D212", "D214", "D400", "D401", "D404", "D405", "D406", "D407", "D412",
"D413", "D415", "D416",
"EM101", "EM102",
"F821",
"FBT001",
"FIX002", "FIX004",
"I001",
"INP001",
"N813", "N818",
"PGH003",
"PLR0911", "PLR0912", "PLR0914", "PLR0915", "PLR2004",
"PT012",
"RUF100",
"S101", "S404",
"SIM102", "SIM108",
"SLF001",
"T201",
"TD002", "TD003",
"TRY003", "TRY004",
# Consider this
"CPY001",
# False positive
"PLC2801",
]
extend-exclude = ["test/data*"]
target-version = "py310"
[tool.ruff.lint.per-file-ignores]
"test/*" = ["ANN201", "ARG001", "E501", "TCH001", "TCH002"]
"refurb/*" = ["PT"]
"refurb/main.py" = ["E501"]
"refurb/visitor/traverser.py" = ["ALL"]
"test/e2e/gbk.py" = ["FURB105"]
[tool.typos.default.extend-words]
nd = "nd"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"