File tree Expand file tree Collapse file tree 6 files changed +20
-15
lines changed Expand file tree Collapse file tree 6 files changed +20
-15
lines changed Original file line number Diff line number Diff line change 1
1
## Document
2
- A model for documents
2
+ A model for documents.
3
3
4
4
### Allowed parameters
5
5
<table >
@@ -38,7 +38,7 @@ A model for documents
38
38
</table >
39
39
40
40
## Section
41
- Will contain one <a href =" #paragraph " >Paragraph</a > or more.
41
+ A model of a section of the < a href = " #document " >Document</ a >. Will contain one <a href =" #paragraph " >Paragraph</a > or more.
42
42
43
43
### Allowed parameters
44
44
<table >
@@ -63,7 +63,7 @@ Will contain one <a href="#paragraph">Paragraph</a> or more.
63
63
</table >
64
64
65
65
## Paragraph
66
- A model of a paragraph
66
+ A model of a paragraph.
67
67
68
68
### Allowed parameters
69
69
<table >
Original file line number Diff line number Diff line change 9
9
@modelspec .define
10
10
class Paragraph (Base ):
11
11
"""
12
- A model of a paragraph
12
+ A model of a paragraph.
13
13
14
14
Args:
15
15
contents: Paragraph contents, which make up the _Section_s.
@@ -36,7 +36,7 @@ class Section(Base):
36
36
@modelspec .define
37
37
class Document (Base ):
38
38
"""
39
- A model for documents
39
+ A model for documents.
40
40
41
41
Args:
42
42
id: The unique id of the document
Original file line number Diff line number Diff line change 1
1
========
2
2
Document
3
3
========
4
- A model for documents
4
+ A model for documents.
5
5
6
6
**Allowed parameters **
7
7
@@ -24,7 +24,7 @@ Allowed child Data Type Description
24
24
=======
25
25
Section
26
26
=======
27
- Will contain one <a href="#paragraph">Paragraph</a> or more.
27
+ A model of a section of the <a href="#document">Document</a>. Will contain one <a href="#paragraph">Paragraph</a> or more.
28
28
29
29
**Allowed parameters **
30
30
@@ -45,7 +45,7 @@ Allowed child Data Type Description
45
45
=========
46
46
Paragraph
47
47
=========
48
- A model of a paragraph
48
+ A model of a paragraph.
49
49
50
50
**Allowed parameters **
51
51
Original file line number Diff line number Diff line change 1
1
{
2
2
"Document" : {
3
- "definition" : " A model for documents" ,
3
+ "definition" : " A model for documents. " ,
4
4
"allowed_parameters" : {
5
5
"id" : {
6
6
"type" : " str" ,
23
23
}
24
24
},
25
25
"Section" : {
26
- "definition" : " Will contain one :class:`Paragraph` or more." ,
26
+ "definition" : " A model of a section of the :class:`Document`. Will contain one :class:`Paragraph` or more." ,
27
27
"allowed_parameters" : {
28
28
"id" : {
29
29
"type" : " str" ,
38
38
}
39
39
},
40
40
"Paragraph" : {
41
- "definition" : " A model of a paragraph" ,
41
+ "definition" : " A model of a paragraph. " ,
42
42
"allowed_parameters" : {
43
43
"contents" : {
44
44
"type" : " str" ,
Original file line number Diff line number Diff line change 1
1
Document :
2
- definition : A model for documents
2
+ definition : A model for documents.
3
3
allowed_parameters :
4
4
id :
5
5
type : str
@@ -15,7 +15,8 @@ Document:
15
15
type : Section
16
16
description : The sections of the document
17
17
Section :
18
- definition : Will contain one :class:`Paragraph` or more.
18
+ definition : A model of a section of the :class:`Document`. Will contain one :class:`Paragraph`
19
+ or more.
19
20
allowed_parameters :
20
21
id :
21
22
type : str
@@ -25,7 +26,7 @@ Section:
25
26
type : Paragraph
26
27
description : The paragraphs
27
28
Paragraph :
28
- definition : A model of a paragraph
29
+ definition : A model of a paragraph.
29
30
allowed_parameters :
30
31
contents :
31
32
type : str
Original file line number Diff line number Diff line change @@ -373,7 +373,11 @@ def _parse_definition(cls) -> str:
373
373
p = parse (cls .__doc__ )
374
374
375
375
# Extract the description, use the long description if available.
376
- return p .long_description if p .long_description else p .short_description
376
+ if p .long_description :
377
+ definition = f"{ p .short_description } { p .long_description } "
378
+ else :
379
+ definition = p .short_description
380
+ return definition
377
381
378
382
@classmethod
379
383
def _parse_allowed_fields (cls ) -> Dict [str , Tuple [str , Any ]]:
You can’t perform that action at this time.
0 commit comments