Skip to content

Commit 0587975

Browse files
committed
linting
1 parent afc3bf0 commit 0587975

File tree

7 files changed

+7
-11
lines changed

7 files changed

+7
-11
lines changed

tests/integrations/aws_lambda/lambda_functions/BasicException/index.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
def handler(event, context):
32
raise RuntimeError("Oh!")
43

tests/integrations/aws_lambda/lambda_functions/BasicOk/index.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
def handler(event, context):
32
return {
43
"event": event,
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# We have no handler() here and try to call a non-existing function.
32

4-
func()
3+
func() # noqa: F821

tests/integrations/aws_lambda/lambda_functions/TimeoutError/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import time
1+
import time
22

33

44
def handler(event, context):

tests/integrations/aws_lambda/test_aws.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
import base64
3333
import json
34-
import re
3534
from textwrap import dedent
3635

3736
import pytest
@@ -217,7 +216,6 @@ def test_handler(event, context):
217216
assert exception["value"] == "Oh!"
218217

219218

220-
221219
def test_traces_sampler_gets_correct_values_in_sampling_context(
222220
run_lambda_function,
223221
DictionaryContaining, # noqa: N803

tests/integrations/aws_lambda/test_aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def lambda_client():
9292
"""
9393
return boto3.client(
9494
"lambda",
95-
endpoint_url=f"http://127.0.0.1:{SAM_PORT}",
95+
endpoint_url=f"http://127.0.0.1:{SAM_PORT}", # noqa: E231
9696
aws_access_key_id="dummy",
9797
aws_secret_access_key="dummy",
9898
)

tests/integrations/aws_lambda/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class LocalLambdaStack(Stack):
2828
"""
2929
Uses the AWS CDK to create a local SAM stack containing Lambda functions.
3030
"""
31+
3132
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
3233
super().__init__(scope, construct_id, **kwargs)
3334
print("[LocalLambdaStack] Creating local SAM Lambda Stack: %s" % self)
@@ -112,7 +113,7 @@ def wait_for_stack(cls, timeout=30, port=SAM_PORT):
112113

113114
try:
114115
# Try to connect to SAM
115-
response = requests.get(f"http://127.0.0.1:{port}/")
116+
response = requests.get(f"http://127.0.0.1:{port}/") # noqa: E231
116117
if response.status_code == 200 or response.status_code == 404:
117118
return
118119

@@ -137,12 +138,12 @@ async def envelope(request: Request):
137138
print("[SentryServerForTesting] Received envelope")
138139
try:
139140
raw_body = await request.body()
140-
except:
141+
except Exception:
141142
return {"status": "no body received"}
142143

143144
try:
144145
body = gzip.decompress(raw_body).decode("utf-8")
145-
except:
146+
except Exception:
146147
# If decompression fails, assume it's plain text
147148
body = raw_body.decode("utf-8")
148149

0 commit comments

Comments
 (0)