Skip to content

Commit b9e5f98

Browse files
pixeebot[bot]pixeebotdtiesling
authored
style: use walrus in conditional
Co-authored-by: pixeebot[bot] <23113631+pixeebot@users.noreply.github.com> Co-authored-by: Danny Tiesling <tiesling@gmail.com>
1 parent 7097058 commit b9e5f98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flask_muck/commands.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@with_appcontext
1212
def openapi_spec() -> None:
1313
"""Print OpenAPI spec JSON for this app's API."""
14-
muck = current_app.extensions.get("muck")
15-
if muck is None:
14+
if (muck := current_app.extensions.get("muck")) is None:
1615
print("No Flask-Muck extension initialized in this app")
16+
return
1717
print_json(json.dumps(muck.spec.to_dict(), indent=2))

0 commit comments

Comments
 (0)