From 6ca59445e2f3d7c6bd394de8f814b6c63183e292 Mon Sep 17 00:00:00 2001 From: aoright <102943475+aoright@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:24:33 +0800 Subject: [PATCH] docs: improve docstrings in __init__.py and schema.py Signed-off-by: aoright <102943475+aoright@users.noreply.github.com> --- src/flask_marshmallow/__init__.py | 4 ++-- src/flask_marshmallow/schema.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/flask_marshmallow/__init__.py b/src/flask_marshmallow/__init__.py index f726d82..2aeab3b 100755 --- a/src/flask_marshmallow/__init__.py +++ b/src/flask_marshmallow/__init__.py @@ -57,7 +57,7 @@ def _attach_fields(obj): - """Attach all the marshmallow fields classes to ``obj``, including + """Attach all the marshmallow field classes to ``obj``, including Flask-Marshmallow's custom fields. """ for attr in base_fields.__all__: @@ -81,7 +81,7 @@ class Marshmallow: all fields in :mod:`marshmallow.fields`, as well as the Flask-specific fields in :mod:`flask_marshmallow.fields`. - You can declare schema like so:: + You can declare a schema like so:: class BookSchema(ma.Schema): id = ma.Integer(dump_only=True) diff --git a/src/flask_marshmallow/schema.py b/src/flask_marshmallow/schema.py index 69c0680..fe3cd12 100644 --- a/src/flask_marshmallow/schema.py +++ b/src/flask_marshmallow/schema.py @@ -25,6 +25,7 @@ def jsonify( :param bool many: Whether `obj` should be serialized as an instance or as a collection. If None, defaults to the value of the `many` attribute on this Schema. + :param args: Additional positional arguments passed to `flask.jsonify`. :param kwargs: Additional keyword arguments passed to `flask.jsonify`. .. versionchanged:: 0.6.0