iodata.docstrings module¶
Docstring decorators for file format implementations.
-
document_dump_many
(fmt, required, optional=None, kwdocs={}, notes=None)[source]¶ Decorate a dump_many function to generate a docstring.
- Parameters
fmt (
str
) – The name of the file format.required (
List
[str
]) – A list of mandatory IOData attributes needed to write the file.optional (
Optional
[List
[str
]]) – A list of optional IOData attributes which can be include when writing the file.kwdocs (
Dict
[str
,str
]) – A dictionary with documentation for keyword arguments. Each key is a keyword argument name and the corresponding value is text explaining the argument.notes (
Optional
[str
]) – Additional information to be added to the docstring.
- Returns
A decorator function.
- Return type
decorator
-
document_dump_one
(fmt, required, optional=None, kwdocs={}, notes=None)[source]¶ Decorate a dump_one function to generate a docstring.
- Parameters
fmt (
str
) – The name of the file format.required (
List
[str
]) – A list of mandatory IOData attributes needed to write the file.optional (
Optional
[List
[str
]]) – A list of optional IOData attributes which can be include when writing the file.kwdocs (
Dict
[str
,str
]) – A dictionary with documentation for keyword arguments. Each key is a keyword argument name and the corresponding value is text explaining the argument.notes (
Optional
[str
]) – Additional information to be added to the docstring.
- Returns
A decorator function.
- Return type
decorator
-
document_load_many
(fmt, guaranteed, ifpresent=None, kwdocs={}, notes=None)[source]¶ Decorate a load_many function to generate a docstring.
- Parameters
fmt (
str
) – The name of the file format.guaranteed (
List
[str
]) – A list of IOData attributes this format can certainly read.ifpresent (
Optional
[List
[str
]]) – A list of IOData attributes this format reads of present in the file.kwdocs (
Dict
[str
,str
]) – A dictionary with documentation for keyword arguments. Each key is a keyword argument name and the corresponding value is text explaining the argument.notes (
Optional
[str
]) – Additional information to be added to the docstring.
- Returns
A decorator function.
- Return type
decorator
-
document_load_one
(fmt, guaranteed, ifpresent=None, kwdocs={}, notes=None)[source]¶ Decorate a load_one function to generate a docstring.
- Parameters
fmt (
str
) – The name of the file format.guaranteed (
List
[str
]) – A list of IOData attributes this format can certainly read.ifpresent (
Optional
[List
[str
]]) – A list of IOData attributes this format reads of present in the file.kwdocs (
Dict
[str
,str
]) – A dictionary with documentation for keyword arguments. Each key is a keyword argument name and the corresponding value is text explaining the argument.notes (
Optional
[str
]) – Additional information to be added to the docstring.
- Returns
A decorator function.
- Return type
decorator