-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
108 lines (92 loc) · 2.82 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[tool.poetry]
name = "serverless-python311-template"
version = "0.1.0"
description = "Serverless Framework Python3.11 Template Repository."
authors = ["Takahashi Katsuyuki <[email protected]>"]
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
aws-lambda-powertools = "^3.0.0"
pydantic = "^2.7.1"
fastjsonschema = "^2.19.1"
aws-xray-sdk = "^2.13.0"
[tool.poetry.group.dev.dependencies]
black = "^25.1.0"
ruff = "^0.11.0"
pytest = "^8.2.0"
pytest-mock = "^3.14.0"
pytest-cov = "^6.0.0"
isort = "^6.0.0"
taskipy = "^1.12.2"
mypy = "^1.10.0"
boto3 = "^1.34.102"
boto3-stubs = { version = "1.37.18", extras = [
"apigateway",
"apigatewaymanagementapi",
"apigatewayv2",
"cloudfront",
"cognito-idp",
"s3",
"ses",
"sesv2",
] }
poetry-plugin-export = "^1.9.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.taskipy.tasks]
test = "pytest -s -vv --cov=. --cov-branch --cov-report=html"
format = "task format-black && task format-isort"
format-black = "black ./src ./tests"
format-isort = "isort ./src ./tests"
lint = "task lint-black && task lint-ruff && task lint-mypy"
lint-ruff = "ruff check src tests"
lint-mypy = "mypy src tests"
lint-black = "black --check src tests"
[tool.pytest.ini_options]
pythonpath = "src/v1"
testpaths = ["tests"]
[tool.black]
line-length = 120
[tool.isort]
# see: https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html
profile = "black"
line_length = 120
import_heading_stdlib = "Standard Library"
import_heading_thirdparty = "Third Party Library"
import_heading_firstparty = "First Party Library"
import_heading_localfolder = "Local Library"
multi_line_output = 3
include_trailing_comma = true
[tool.mypy]
# The mypy configurations: https://mypy.readthedocs.io/en/stable/config_file.html
# Prefixes each error with the relevant context.
show_error_context = true
# Shows column numbers in error messages.
show_column_numbers = true
# Suppresses error messages about imports that cannot be resolved.
ignore_missing_imports = true
# Disallows defining functions without type annotations or with incomplete type annotations (a superset of disallow_incomplete_defs)
disallow_untyped_defs = true
# Shows a warning when returning a value with type Any from a function declared with a non- Any return type.
warn_return_any = true
# Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis.
warn_unreachable = true
# Warns about unneeded # type: ignore comments.
warn_unused_ignores = true
# Warns about casting an expression to its inferred type.
warn_redundant_casts = true
[tool.ruff]
exclude = [
".venv",
"__pycache__",
".git",
".mypy_cache",
".pytest_cache",
"build",
"dist",
"node_modules",
]
line-length = 120
indent-width = 4