Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
anguillanneuf committed Feb 8, 2022
1 parent c156e3d commit e25d313
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions samples/snippets/subscriber.py
Expand Up @@ -236,11 +236,7 @@ def create_subscription_with_filtering(

with subscriber:
subscription = subscriber.create_subscription(
request={
"name": subscription_path,
"topic": topic_path,
"filter": filter,
}
request={"name": subscription_path, "topic": topic_path, "filter": filter}
)
print(f"Created subscription with filtering enabled: {subscription}")
# [END pubsub_create_subscription_with_filter]
Expand Down
6 changes: 4 additions & 2 deletions samples/snippets/subscriber_test.py
Expand Up @@ -43,7 +43,7 @@
NEW_ENDPOINT = f"https://{PROJECT_ID}.appspot.com/push2"
DEFAULT_MAX_DELIVERY_ATTEMPTS = 5
UPDATED_MAX_DELIVERY_ATTEMPTS = 20
FILTER = "attributes.author=\"unknown\""
FILTER = 'attributes.author="unknown"'

C = TypeVar("C", bound=Callable[..., Any])

Expand Down Expand Up @@ -401,7 +401,9 @@ def test_create_subscription_with_filtering(
except NotFound:
pass

subscriber.create_subscription_with_filtering(PROJECT_ID, TOPIC, SUBSCRIPTION_ADMIN, FILTER)
subscriber.create_subscription_with_filtering(
PROJECT_ID, TOPIC, SUBSCRIPTION_ADMIN, FILTER
)

out, _ = capsys.readouterr()
assert "Created subscription with filtering enabled" in out
Expand Down

0 comments on commit e25d313

Please sign in to comment.