@@ -384,9 +384,9 @@ class Meta(Schema.Opts):
384384 .. versionchanged:: 3.26.0 Deprecate `ordered`. Field order is preserved by default.
385385 """
386386
387- fields : typing .ClassVar [tuple [Field ] | list [Field ]]
387+ fields : typing .ClassVar [tuple [str , ... ] | list [str ]]
388388 """Fields to include in the (de)serialized result"""
389- additional : typing .ClassVar [tuple [Field ] | list [Field ]]
389+ additional : typing .ClassVar [tuple [str , ... ] | list [str ]]
390390 """Fields to include in addition to the explicitly declared fields.
391391 `additional <marshmallow.Schema.Meta.additional>` and `fields <marshmallow.Schema.Meta.fields>`
392392 are mutually-exclusive options.
@@ -396,7 +396,7 @@ class Meta(Schema.Opts):
396396 usually better to define fields as class variables, but you may need to
397397 use this option, e.g., if your fields are Python keywords.
398398 """
399- exclude : typing .ClassVar [tuple [Field ] | list [Field ]]
399+ exclude : typing .ClassVar [tuple [str , ... ] | list [str ]]
400400 """Fields to exclude in the serialized result.
401401 Nested fields can be represented with dot delimiters.
402402 """
@@ -408,17 +408,20 @@ class Meta(Schema.Opts):
408408 """Default format for `DateTime <marshmallow.fields.DateTime>` fields."""
409409 timeformat : typing .ClassVar [str ]
410410 """Default format for `Time <marshmallow.fields.Time>` fields."""
411- render_module : typing .ClassVar [types .RenderModule ]
411+
412+ # FIXME: Use a more constrained type here.
413+ # ClassVar[RenderModule] doesn't work.
414+ render_module : typing .Any
412415 """ Module to use for `loads <marshmallow.Schema.loads>` and `dumps <marshmallow.Schema.dumps>`.
413416 Defaults to `json` from the standard library.
414417 """
415418 ordered : typing .ClassVar [bool ]
416419 """If `True`, `Schema.dump <marshmallow.Schema.dump>` is a `collections.OrderedDict`."""
417420 index_errors : typing .ClassVar [bool ]
418421 """If `True`, errors dictionaries will include the index of invalid items in a collection."""
419- load_only : typing .ClassVar [tuple [Field ] | list [Field ]]
422+ load_only : typing .ClassVar [tuple [str , ... ] | list [str ]]
420423 """Fields to exclude from serialized results"""
421- dump_only : typing .ClassVar [tuple [Field ] | list [Field ]]
424+ dump_only : typing .ClassVar [tuple [str , ... ] | list [str ]]
422425 """Fields to exclude from serialized results"""
423426 unknown : typing .ClassVar [str ]
424427 """Whether to exclude, include, or raise an error for unknown fields in the data.
0 commit comments