Skip to content

Commit 18a3c55

Browse files
fix(jmespath_util): snappy as dev dep and typing example (aws-powertools#1446)
1 parent 8e24ae3 commit 18a3c55

File tree

5 files changed

+69
-7
lines changed

5 files changed

+69
-7
lines changed

aws_lambda_powertools/utilities/data_classes/lambda_function_url_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class LambdaFunctionUrlEvent(APIGatewayProxyEventV2):
77
Notes:
88
-----
99
Lambda Function URL follows the API Gateway HTTP APIs Payload Format Version 2.0.
10-
10+
1111
Keys related to API Gateway features not available in Function URL use a sentinel value (e.g.`routeKey`, `stage`).
1212
1313
Documentation:

examples/jmespath_functions/src/powertools_json_idempotency_jmespath.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class PaymentError(Exception):
2020
def handler(event, context) -> dict:
2121
body = json.loads(event["body"])
2222
try:
23-
payment = create_subscription_payment(user=body["user"], product_id=body["product_id"])
24-
return {"payment_id": payment.id, "message": "success", "statusCode": 200}
23+
payment: dict = create_subscription_payment(user=body["user"], product_id=body["product_id"])
24+
return {"payment_id": payment.get("id"), "message": "success", "statusCode": 200}
2525
except requests.HTTPError as e:
2626
raise PaymentError("Unable to create payment subscription") from e
2727

mypy.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ ignore_missing_imports = True
4242
ignore_missing_imports = True
4343

4444
[mypy-aiohttp]
45-
ignore_missing_imports = True
45+
ignore_missing_imports = True
46+
47+
[mypy-snappy]
48+
ignore_missing_imports = True

poetry.lock

+61-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ mypy-boto3-lambda = "^1.24.0"
6868
mypy-boto3-xray = "^1.24.0"
6969
types-requests = "^2.28.7"
7070
typing-extensions = { version = "^4.3.0", python = ">=3.7" }
71+
python-snappy = "^0.6.1"
7172

7273
[tool.poetry.extras]
7374
pydantic = ["pydantic", "email-validator"]

0 commit comments

Comments
 (0)