File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,19 @@ def class_schema(
81
81
clazz : type , meta : t .Dict [str , t .Any ] = {}
82
82
) -> t .Type [marshmallow .Schema ]:
83
83
"""
84
- Convert a class to a marshmallow schema
85
- :param clazz: A python class (may be a dataclass)
86
- :return: A marshmallow Schema corresponding to the dataclass
84
+ Convert a class to a marshmallow schema.
85
+
86
+ Args:
87
+ clazz: A python class (may be a dataclass)
88
+ meta: The marshmallow schema metadata dict.
89
+
90
+ Returns:
91
+ A :class:`marshmallow.Schema` type corresponding to the dataclass.
92
+
87
93
.. note::
88
94
All the arguments supported by marshmallow field classes are can
89
95
be passed in the `metadata` dictionary of a field.
96
+
90
97
If you want to use a custom marshmallow field
91
98
(one that has no equivalent python type), you can pass it as the
92
99
``marshmallow_field`` key in the metadata dictionary.
Original file line number Diff line number Diff line change @@ -87,9 +87,13 @@ def fixture_from_dict(
87
87
"""
88
88
Create fixture parametrized to yield each value and labeled with the
89
89
corresponding ID.
90
- :param name: Name of the fixture itself
91
- :param id_to_value: Mapping from ID labels to values
92
- :return: The PyTest fixture
90
+
91
+ Args:
92
+ name: Name of the fixture itself
93
+ id_to_value: Mapping from ID labels to values
94
+
95
+ Returns:
96
+ The PyTest fixture
93
97
"""
94
98
@pytest .fixture (
95
99
name = name ,
You can’t perform that action at this time.
0 commit comments