-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
116 lines (105 loc) · 3.21 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
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
[tool.poetry]
name = "validate-python-headers"
version = "0.5.0.dev0"
description = "Python header validator"
license = "Apache-2.0"
authors = ["François-Guillaume Fernandez <[email protected]>"]
maintainers = ["François-Guillaume Fernandez <[email protected]>"]
readme = "README.md"
repository = "https://github.com/frgfm/validate-python-headers"
keywords = ["github action", "python", "header", "copyright", "license"]
[tool.poetry.dependencies]
python = "^3.9"
[tool.poetry.group.quality]
optional = true
[tool.poetry.group.quality.dependencies]
ruff = "==0.5.6"
mypy = "==1.10.0"
pre-commit = "^3.8.0"
[tool.ruff]
line-length = 120
target-version = "py39"
preview = true
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
# "D101", "D103", # pydocstyle missing docstring in public function/class
"D201","D202","D207","D208","D214","D215","D300","D301","D417", "D419", # pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"CPY", # flake8-copyright
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PERF", # perflint
"NPY", # numpy
"FAST", # fastapi
"FURB", # refurb
"RUF", # ruff specific
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"B904", # raise from
"C901", # too complex
"F403", # star imports
"E731", # lambda assignment
"C416", # list comprehension to list()
"ANN101", # missing type annotations on self
"ANN102", # missing type annotations on cls
"ANN002", # missing type annotations on *args
"ANN003", # missing type annotations on **kwargs
"COM812", # trailing comma missing
"ISC001", # implicit string concatenation (handled by format)
"G004", # logging-fstring-interpolation
]
exclude = [".git"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
known-first-party = []
known-third-party = []
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["I001", "F401", "CPY001"]
".github/**.py" = ["D", "T201", "ANN"]
"src/**.py" = ["ANN"]
"src/tests/**.py" = ["D103", "CPY001", "S101", "T201", "ANN001", "ANN201", "ARG001"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.9"
files = "src/*.py"
show_error_codes = true
pretty = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
check_untyped_defs = true
implicit_reexport = false
explicit_package_bases = true