forked from deniskrumko/flake8-hangover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
129 lines (120 loc) · 3.34 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
[project]
name = "flake8-hangover"
dynamic = ["version"]
description = "flake8 plugin to prevent specific hanging indentations"
readme = "README.md"
license = {text = "MIT"}
urls.repository = "https://github.com/deniskrumko/flake8-hangover"
authors = [
{name = "Denis Krumko", email = "[email protected]"},
{name = "strayge", email = "[email protected]"},
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
requires-python = ">=3.8"
dependencies = [
"flake8",
]
optional-dependencies.dev = [
"flake8-pyproject",
"flake8-commas",
"flake8-isort !=5.0.1, !=5.0.2",
"flake8-bugbear",
"flake8-simplify",
"flake8-print",
"flake8-debugger",
"isort",
"mypy",
"pytest",
"pytest-cov",
"coverage[toml]",
"astpretty",
]
[project.entry-points."flake8.extension"]
FHO = "flake8_hangover:Plugin"
[build-system]
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"
[tool.pdm.version]
source = "scm"
write_to = "flake8_hangover/__version__.py"
write_template = "__version__ = '{}'"
[tool.flake8]
exclude = [
".git",
".idea",
"__pycache__",
"venv",
]
max-line-length = 100
ignore = [
# trailing comma prohibited, like (x, y,)
"C819",
# line break before binary operator
"W503",
# enumerate instead of +=1 in for (not count for var increment at other places)
"SIM113",
# nested if's instead of single complex if (sometimes it increase readability)
"SIM102",
# error handle should be first to prevent another nested (too many false positives)
"SIM106",
# dataclasses instead of simple classes (too broad reports)
"SIM119",
# combine if's branches with same body (false positive, sometimes decrease readability)
"SIM114",
# use any(...), all(...) instead of actual loop - not *required* functional codestyle
"SIM110", "SIM111",
# dictionary lookup for 3+ if's
"SIM116",
]
per-file-ignores = [
# unused imports
"*/__init__.py:F401",
]
[tool.pytest.ini_options]
addopts = "-s -l"
[tool.mypy]
exclude = ["tests", "fabfile\\.py"]
namespace_packages = true
disable_error_code = "attr-defined"
ignore_missing_imports = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_return_any = true
warn_unreachable = true
[tool.isort]
line_length = 100
multi_line_output = 3
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
force_grid_wrap = 2
combine_as_imports = true
use_parentheses = true
[tool.coverage]
run.relative_files = true
run.branch = true
run.source = ["."]
run.omit = [
"*/tests/*",
"./fabfile.py",
"./setup.py",
]
report.fail_under = 80
report.precision = 2