class documentation
Represent a field with a name and/or a type and/or a description. Commonly a parameter description. It's also used for Returns section and other sections structured with fields.
This representation do not hold the information about which section the field correspond, it depends of context of usage.
| Method | __bool__ |
Returns True if the field has any kind of content. |
| Method | __init__ |
attrs generated method |
| Instance Variable | content |
The content of the field. |
| Instance Variable | lineno |
Line number of the field relative to the begening of the docstring. |
| Instance Variable | name |
The name of the parameter or return value, can be empty. Let's note that Field.name is not the field_name in the docutils sense (i.e. "param" or "type"). But the actual parameter name. |
| Instance Variable | type |
The enventual type of the parameter/return value. |
attrs generated method
| Parameters | |
name:str | The name of the parameter or return value, can be empty. Let's note that Field.name is not the field_name
in the docutils sense (i.e. "param" or "type"). But the actual parameter name. |
type:str | The enventual type of the parameter/return value. |
content:list[ | The content of the field. |
lineno:int | Line number of the field relative to the begening of the docstring. |
The name of the parameter or return value, can be empty. Let's note that Field.name is not the field_name
in the docutils sense (i.e. "param" or "type"). But the actual parameter name.