-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (119 loc) · 3.01 KB
/
pyproject.toml
File metadata and controls
138 lines (119 loc) · 3.01 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
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "e3-aws"
authors = [{name="AdaCore's IT Team"}]
dynamic = ["version"]
description = "E3 Cloud Formation Extensions"
dependencies = [
"boto3",
"botocore",
"e3-core",
"pyyaml",
"troposphere"
]
[project.scripts]
e3-aws-assume-profile = "e3.aws:assume_profile_main"
e3-aws-assume-role = "e3.aws:assume_role_main"
[project.entry-points."e3.event.handler"]
s3-boto3 = "e3.aws.handler.s3:S3Handler"
[project.optional-dependencies]
test = [
"awscli",
"pytest",
"pytest-html",
"mock",
"requests_mock",
"httpretty",
"flask",
"moto[sts, dynamodb]",
"python-on-whales"
]
check = [
"mypy==1.8.0",
"pytest",
"flask",
"moto[sts, dynamodb]",
"bandit",
"pip-audit",
"requests_mock",
"types-colorama",
"types-psutil",
"types-python-dateutil",
"types-PyYAML",
"types-requests",
"types-setuptools",
"python-on-whales",
"types-boto3[essential,cloudfront,cloudwatch,ec2,ecr,iam,lambda,logs,pricing,scheduler,secretsmanager,ssm,sts]",
]
[tool.setuptools.dynamic]
version = {file = "VERSION"}
[tool.coverage.report]
exclude_also = [
"if tries < max_tries:"
]
[tool.coverage.run]
branch = false
[tool.coverage.html]
title = "e3 aws coverage report"
[tool.pytest.ini_options]
addopts = "--failed-first --e3"
[tool.mypy]
# Ensure mypy works with namespace in which there is no toplevel
# __init__.py. Explicit_package_bases means that that mypy_path
# will define which directory is the toplevel directory of the
# namespace.
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = [
"coverage.*",
"botocore.*",
"boto3.*",
"requests.*",
"troposphere.*",
]
ignore_missing_imports = true
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"C901", # too complex function (MCCabe complexity)
"ERA001", # too many false positive with this rule
"G004", # we accept f-string in logging statements
"PERF203", # `try`-`except` within a loop incurs performance overhead for Python < 3.11
"PGH003", # allow type: ignore - can be done by mypy if we wanted to
"S101", # use of assert statement, used for mypy
"T201", # print statement are allowed
# Recommendations from ruff
"COM812", # Avoid enforcing trailing commas - use of formatter instead
"D203", # 1 blank line required before class docstring, we follow pep257
"D213", # We use pep257 convention for multi-line docstrings
]
[tool.ruff.lint.isort]
# Accept to have from xxx import yyy as zzz combined instead of one per line
combine-as-imports = true
section-order = [
"future",
"standard-library",
"third-party",
"e3",
"first-party",
"local-folder",
"typing"
]
[tool.ruff.lint.isort.sections]
e3 = ["e3*"]
typing = ["typing"]
[tool.ruff.lint.pylint]
max-args = 8
max-statements = 75