-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (122 loc) · 2.95 KB
/
pyproject.toml
File metadata and controls
143 lines (122 loc) · 2.95 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[tool.poetry]
name = "src"
version = "0.0.0"
description = ""
authors = ["Francis Pelletier <francis.pelletier@mila.quebec>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<3.13.3"
mkdocs = "^1.6.1"
[tool.poetry.group.dev.dependencies]
pre-commit = "^4.2.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
#
# Scripts
#
[tool.poetry.scripts]
#
# Tools
#
[tool.autoflake]
remove-all-unused-imports = true
in-place = true
ignore-init-module-imports = true
remove-unused-variables = true
recursive = true
[tool.autopep8]
max_line_length = 120
in-place = true
aggressive = 2
ignore = ["W503", "E203", "E501"]
recursive = true
[tool.flake8]
max-line-length = 120
ignore = ["E203", "E266", "E501", "W503"]
docstring-convention = "numpy"
max-complexity = 20
per-file-ignores = []
exclude = [
".git",
"migrations",
"__pycache__"
]
[tool.pylint]
disable = "C0114,C0115,C0116,R0903,R1710,W1203"
max-line-length = 120
max-locals = 20
max-args = 16
max-positional-arguments = 16
max-attributes = 20
[tool.black]
line-length = 120
target-version = ["py311"]
[tool.isort]
profile = "black"
[tool.flynt]
line-length = 120
transform-concats = true
verbose = true
[tool.docformatter]
style = "numpy"
pre-summary-newline = true
wrap-descriptions = 120
wrap-summaries = 120
blank = false
exclude = []
recursive = true
[tool.ruff]
line-length = 120
target-version = "py311"
exclude = [
".git",
"migrations",
"__pycache__",
]
[tool.ruff.lint]
select = [
"A", # Flake8 Built ins
"E", # Error (Flake8)
"F", # Pyflakes (Flake8)
"W", # Warning (Flake8)
"I", # isort (import sorting)
"N", # Naming conventions (Pylint, etc.)
"C90", # mccabe complexity (replaces flake8 --max-complexity and mccabe)
"B", # Bugbear (common linting issues)
"UP", # pyupgrade (suggests modern Python syntax)
"PLR", # Pylint refactor
"PLE", # Pylint error (specific Pylint error rules)
"PLW", # Pylint warning (specific Pylint warning rules)
"PLC", # Pylint convention (specific Pylint convention rules)
"R", # Refactor (Pylint refactoring suggestions)
"TID", # TO DO comments
"FAST",# FastAPI
"C4", # List and dict comprehensions
"DJ", # Django
"PIE", # Returns and unnecessary returns
"Q", # Double quotes
"RET", # Fix return statements
"PTH", # Enforce pathlib
"ARG", # Unused argument
"FLY", # Flynt
"NPY", # Numpy specific
"PD", # Pandas specific
"RUF", # Ruff specific
]
ignore = [
"E203", # whitespace before ':', Black already handles this
"E266", # too many leading '#' for comments
"E501", # line too long (we enforce via line-length instead)
"RET504",
"RUF013",
"PTH123"
]
[tool.ruff.lint.pydocstyle]
convention = "numpy" # Corresponds to flake8's docstring-convention and docformatter style.
[tool.ruff.lint.pylint]
max-args = 16
[tool.ruff.lint.mccabe]
# cyclomatic complexity
max-complexity = 18