-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (109 loc) · 3.43 KB
/
pyproject.toml
File metadata and controls
122 lines (109 loc) · 3.43 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
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
[tool.poetry]
name = "machine_setup"
version = "0.1.0"
description = "Code that sets up my computers with the software and configuration I want."
authors = ["Michal Bultrowicz <michal.bultrowicz@gmail.com>"]
license = "MIT"
[tool.poetry.dependencies]
python = "~3.13"
[tool.poetry.group.dev.dependencies]
pytest = "^6.2.5"
requests = "^2.27.0"
python-dateutil = "^2.8.2"
pytz = "^2021.3"
pdbpp = "^0.10.3"
mypy = "^1.4.1"
ruff = "^0.5.5"
ptpython = "^3.0.30"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Config documentation: https://docs.astral.sh/ruff/settings/
[tool.ruff]
target-version = "py313"
line-length = 115
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.lint]
preview = false
# Docs for the rules: https://docs.astral.sh/ruff/rules/
# This should be almost all rules with some exception. Listed in the order from docs.
# Excluded checkers:
# - CPY - copyright
select = ["F", "E", "W",
"C90", "I", "N",
"D", "UP", "YTT",
"ANN", "ASYNC", "ASYNC1",
"S", "BLE", "FBT",
"B", "A", "COM",
"C4", "DTZ", "T10", "DJ",
"EM", "EXE", "ISC",
"ICN", "G", "INP",
"PIE", "T20", "PYI",
"PT", "Q", "RSE",
"RET", "SLF", "SLOT",
"SIM", "TID", "TCH",
"INT", "ARG", "PTH",
"TD", "FIX", "ERA",
"PD", "PGH", "PL",
"TRY", "FLY", "NPY",
"PERF", "FURB", "LOG",
"RUF",
]
ignore = [
"TD002", "TD003", "TD004", "TD007", # Ignore errors for specific todos in code
"S101", # Ignore asserts errors since cannot set for tests and would require for each project and tests specific pyproject configuration
"ANN101", # MyPy is checking that part
"ANN401", # If needed used deliberately
"PT001", # Use fixtures without brackets if they have no arguments
"B008", # FastAPI requires this for its dependency injection
"COM812", # Ignoring, we don't want commas at the end if it is last element
"D104", # allow missing docstring in public package
"D100", # allow missing docstring in public module
"D103", # allow missing docstring in public function
"D203", # choosing no blank line before docstrings on classes
"D212", # choosing a line break at beginning of docstrings
"D417", # not all arguments need documentation
"FBT001", # boolean function arguments can be OK
"FBT002", # boolean function arguments defaults can be OK
"FIX002", # TODOs in code are acceptable
"G004", # f-strings in logs are OK, really
"PT023", # We want to be able to call pytest mark without parenthesis
"ISC001", # ruff is suggesting that this can conflict with the formatter
]
# Only sorting imports now. Other fixes could be enabled.
fixable = ["I"]
unfixable = []
# TODO set that to the standard logger object when there's one
# https://docs.astral.sh/ruff/settings/#lint_logger-objects
# logger-objects = []
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.ruff.format]
docstring-code-format = true
[tool.bandit]
skips = ["B101"]