Skip to content

Commit 35b7c44

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c53b006 commit 35b7c44

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/apispec_webframeworks/flask.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ def path_helper(
150150
view = self._view_for_rule(rule, app=app)
151151
view_doc = view.__doc__ or ""
152152
doc_operations = yaml_utils.load_operations_from_docstring(view_doc)
153-
doc_operations = {k: v for k, v in doc_operations.items() if k.upper() in rule.methods or k.startswith("x-")}
153+
doc_operations = {
154+
k: v
155+
for k, v in doc_operations.items()
156+
if k.upper() in rule.methods or k.startswith("x-")
157+
}
154158
operations.update(doc_operations)
155159
if hasattr(view, "view_class") and issubclass(view.view_class, MethodView): # noqa: E501
156160
# method attribute is dynamically added, which is supported by mypy

tests/test_ext_flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def get_pet(pet_id):
184184
def test_multiple_paths(self, app, spec):
185185
@app.put("/user")
186186
@app.route("/user/<user>")
187-
def user(user = None):
187+
def user(user=None):
188188
"""A greeting endpoint.
189189
190190
---

0 commit comments

Comments
 (0)