-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
88 lines (72 loc) · 2.8 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
[project]
name = "experiments"
version = "0.1.0"
# Authors are the current, primary stuards of the repo
# contributors can be found on github
authors = [
{ name = "Dylan Paiton", email = "dylan@delv.tech" },
{ name = "Mihai Cosma", email = "mihai@delv.tech" },
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["--tb=short"]
norecursedirs = ".git examples hyperdrive_solidity"
python_files = "*_test.py test_*.py"
log_cli = true
log_cli_level = "WARNING"
log_cli_format = "\n%(asctime)s: %(levelname)s: %(filename)s:%(lineno)s::%(module)s::%(funcName)s:\n%(message)s"
log_cli_date_format = "%y-%m-%d %H:%M:%S"
[tool.pylint.format]
max-line-length = "120"
[tool.black]
line-length = "120"
extend-exclude = "\\.ipynb"
[tool.pylint]
exclude = [".venv", ".vscode", "docs"]
[tool.pylance]
exclude = [".venv", ".vscode", "docs"]
[tool.pyright]
exclude = [".venv", ".vscode", "docs"]
[tool.isort]
known_first_party = ["agent0"]
line_length = 120
[tool.ruff]
# Default is: pycodestyle (E) and Pyflakes (F)
# We add flake8-builtins (A), pydocstyle (D), isort (I), pep8-naming (N), and pylint (PL).
# We remove pycodestyle (E) since it throws erroneous line too long errors.
# We remove Pyflakes (F) since it complains about `import *` which we need.
select = ["A", "D", "I", "N", "PL"]
# We ignore the following rules:
# A002: Argument `X` is shadowing a Python builtin
# D100: missing docstring in public module
# D101: missing docstring in public class
# D102: missing docstring in public method
# D103: missing docstring in public function
# D105: missing docstring in magic method
# D107: missing docstring in __init__
# D203: 1 blank line required before class docstring (incompatible with D211: no blank lines before class docstring)
# D213: multi-line-summary-second-line (incompatible with D212: multi-line summary should start at the first line)
# D413: Missing blank line after last section
# D415: First line should end with a period, question mark, or exclamation point (in period-only D400)
# D416: section-name-ends-in-colon (numpy style guide doesn't use colons after sections, i.e. Parameters)
# PLR0912: Too many branches (X > 12)
# PLR0913: Too many arguments to function call (X > 5)
# PLR0915: Too many statements (X > 50)
# PLR2004: Magic value used in comparison
ignore = ["A002", "D100", "D101", "D102", "D103", "D105", "D107", "D203", "D213", "D413", "D415", "D416", "PLR0912", "PLR0913", "PLR0915", "PLR2004"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "D", "I", "N", "PL"]
unfixable = []
line-length = 120
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py310"
exclude = [
".venv",
".vscode",
"docs",
"lib"
]
[tool.ruff.lint.isort]
known-first-party = ["agent0"]