generated from algorandfoundation/algokit-beaker-default-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml.jinja
84 lines (79 loc) · 1.96 KB
/
pyproject.toml.jinja
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
[tool.poetry]
name = "{{ project_name }}"
version = "0.1.0"
description = "Algorand smart contracts"
authors = ["{{ author_name }} <{{ author_email }}>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
algokit-utils = "^2.4.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.4.0"
[tool.poetry.group.dev.dependencies]
{% if deployment_language == 'python' -%}
algokit-client-generator = "^1.1.3"
{% endif -%}
{% if use_python_black -%}
black = {extras = ["d"], version = "*"}
{% endif -%}
{% if python_linter == 'ruff' -%}
ruff = "^0.1.6"
{% elif python_linter == 'flake8' -%}
flake8 = "*"
{% endif -%}
{% if use_python_mypy -%}
mypy = "1.11.0"
{% endif -%}
{% if use_python_pytest -%}
pytest = "*"
pytest-cov = "*"
{% endif -%}
{% if use_python_pip_audit -%}
pip-audit = "*"
{% endif -%}
{% if use_pre_commit -%}
pre-commit = "*"
{% endif -%}
puyapy = "*"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
{% if python_linter == 'ruff' -%}
[tool.ruff]
line-length = 120
select = ["E", "F", "ANN", "UP", "N", "C4", "B", "A", "YTT", "W", "FBT", "Q", "RUF", "I"]
ignore = [
"ANN101", # no type for self
"ANN102", # no type for cls
]
unfixable = ["B", "RUF"]
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
suppress-none-returning = true
{% endif -%}
{% if use_python_pytest %}
[tool.pytest.ini_options]
pythonpath = ["smart_contracts", "tests"]
{% endif -%}
{% if use_python_mypy %}
[tool.mypy]
files = "smart_contracts/"
python_version = "3.12"
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_equality = true
extra_checks = true
disallow_any_unimported = true
disallow_any_expr = true
disallow_any_decorated = true
disallow_any_explicit = true
{% endif -%}