-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (85 loc) · 3.23 KB
/
Copy pathpyproject.toml
File metadata and controls
96 lines (85 loc) · 3.23 KB
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
[tool.poetry]
name = "poetry-lock-listener"
version = "0.2.4"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
poetry = ">=1.7.1"
cleo = "^2.1.0"
tomli = "^2.0.1"
[tool.poetry.plugins."poetry.application.plugin"]
lock_listener = "poetry_lock_listener.plugin:LockListenerPlugin"
[tool.poetry.group.dev.dependencies]
ruff = ">=0.1.8"
coverage = "^7.3.3"
pytest = "^7.4.3"
mypy = ">=1.7.1"
docker = "^7.1.0"
yellowbox = "^0.8.8"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py310"
line-length = 120
output-format = "full"
[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
select = ["I", "E", "W", "F", "N", "S", "BLE", "COM", "C4", "ISC", "ICN", "G", "PIE", "T20", "PYI", "Q", "SLF", "SIM",
"ERA", "PGH", "PLC", "PLE", "PLR", "PLW", "RUF", "PT", "UP", "B", "ANN", "ASYNC", "FBT003", "A", "INP",
"SLOT", "TID", "PTH", "FLY", "PERF"]
# should be included later: RET?, ARG, TRY, DTZ?, FA, RSE?, TCH?
ignore = [
"ISC001", # disabled because of formatter
"COM812", # trailing comma, handled by black
"PLR2004", # Magic value used in comparison
"PLR0913", # Too many arguments to function call
"PLR0912", # too many branches
"PLR0911", # Too many return statements
"PLR0915", # too many statements
"SIM108", # Use ternary operator instead of `if`-`else`-block
"SIM105", # Use `contextlib.suppress(...)` instead of try-except-pass
"S101", # assert detected
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"SIM118", # Use `key in {}` instead of `key in {}.keys()`
"SIM112", # Use capitalized environment variable
"S311", # use of non-cryptographic random
"ANN401", # Dynamic type annotation
"A003", # class attribute shadows built-in
"PERF203", # `try`-`except` within a loop incurs performance overhead
"B028", # no explicit stacklevel on warn
"BLE001", # Do not catch blind exception: `Exception`
]
[tool.ruff.lint.isort]
combine-as-imports=true
[tool.ruff.lint.flake8-annotations]
suppress-none-returning = true
[tool.ruff.lint.flake8-pytest-style]
raises-require-match-for = []
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"ANN", # annotations
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"S105", # Possible hardcoded password
"S113", # Probable use of requests call without timeout
"PIE804", # Unnecessary `dict` kwargs
"PT013", # Found incorrect import of pytest, use simple `import pytest` instead
"PT004", # Fixture does not return anything, add leading underscore
"BLE001", # BLE001 Do not catch blind exception: `Exception`
"F405", # name may be undefined, or defined from star imports
"F403", # star import used; unable to detect undefined names
"T201", # `print` found
"SLF001", # Private member accessed
"PLC1901", # simplify str == ""
"B018", # useless expression
"FBT", # boolean params
"A", # builtin shadowing
"INP", # implicit namespace packages
"PTH", # use pathlib
"PERF", # performance anti-patterns
]