Skip to content

Add trailing commas from COM812 suggestions #2029

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
merged 1 commit into from
Apr 19, 2024
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
6 changes: 4 additions & 2 deletions src/mock_vws/_flask_server/vws.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ def get_target(target_id: str) -> Response:


@VWS_FLASK_APP.route(
"/targets/<string:target_id>", methods=[HTTPMethod.DELETE]
"/targets/<string:target_id>",
methods=[HTTPMethod.DELETE],
)
def delete_target(target_id: str) -> Response:
"""
Expand Down Expand Up @@ -433,7 +434,8 @@ def target_summary(target_id: str) -> Response:


@VWS_FLASK_APP.route(
"/duplicates/<string:target_id>", methods=[HTTPMethod.GET]
"/duplicates/<string:target_id>",
methods=[HTTPMethod.GET],
)
def get_duplicates(target_id: str) -> Response:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def validate_content_type_header_given(
request requires one.
"""
request_needs_content_type = bool(
request_method in {HTTPMethod.POST, HTTPMethod.PUT}
request_method in {HTTPMethod.POST, HTTPMethod.PUT},
)
if request_headers.get("Content-Type") or not request_needs_content_type:
return
Expand Down
3 changes: 2 additions & 1 deletion tests/mock_vws/test_flask_app_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def test_structural_similarity_matcher(
) -> None:
"""The structural similarity matcher matches similar images."""
monkeypatch.setenv(
name="QUERY_IMAGE_MATCHER", value="structural_similarity"
name="QUERY_IMAGE_MATCHER",
value="structural_similarity",
)
database = VuforiaDatabase()
vws_client = VWS(
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_vws/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ def test_updated_target(
# second.
assert target_timestamp >= original_target_timestamp
time_difference = abs(
approximate_target_updated - target_timestamp.timestamp()
approximate_target_updated - target_timestamp.timestamp(),
)
max_time_difference = 5
assert time_difference < max_time_difference
Expand Down