Skip to content

fix(jmespath_util): snappy as dev dep and typing example #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class LambdaFunctionUrlEvent(APIGatewayProxyEventV2):
Notes:
-----
Lambda Function URL follows the API Gateway HTTP APIs Payload Format Version 2.0.
Keys related to API Gateway features not available in Function URL use a sentinel value (e.g.`routeKey`, `stage`).
Documentation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class PaymentError(Exception):
def handler(event, context) -> dict:
body = json.loads(event["body"])
try:
payment = create_subscription_payment(user=body["user"], product_id=body["product_id"])
return {"payment_id": payment.id, "message": "success", "statusCode": 200}
payment: dict = create_subscription_payment(user=body["user"], product_id=body["product_id"])
return {"payment_id": payment.get("id"), "message": "success", "statusCode": 200}
except requests.HTTPError as e:
raise PaymentError("Unable to create payment subscription") from e

Expand Down
5 changes: 4 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-aiohttp]
ignore_missing_imports = True
ignore_missing_imports = True

[mypy-snappy]
ignore_missing_imports = True
64 changes: 61 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ mypy-boto3-lambda = "^1.24.0"
mypy-boto3-xray = "^1.24.0"
types-requests = "^2.28.7"
typing-extensions = { version = "^4.3.0", python = ">=3.7" }
python-snappy = "^0.6.1"

[tool.poetry.extras]
pydantic = ["pydantic", "email-validator"]
Expand Down