-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
863 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from tests.fixtures.docstrings.accessible.schema import ( | ||
Root, | ||
RootEnum, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
from dataclasses import dataclass, field | ||
from enum import Enum | ||
from typing import Optional | ||
|
||
__NAMESPACE__ = "urn:books" | ||
|
||
|
||
class RootEnum(Enum): | ||
A = "A" | ||
B = "B" | ||
|
||
|
||
RootEnum.A.__doc__ = "Lorem ipsum dolor" | ||
RootEnum.B.__doc__ = ( | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi dapibus." | ||
) | ||
|
||
|
||
@dataclass | ||
class Root: | ||
"""This is the root type documentation. Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit. Morbi dapibus. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec | ||
imperdiet lacus sed sagittis scelerisque. Ut sodales metus: "sit", | ||
"amet", "lectus" | ||
""" | ||
class Meta: | ||
namespace = "urn:books" | ||
|
||
a: Optional["Root.A"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
"doc": ( | ||
"This is an inner type field documentation.\nLorem ipsum dolor" | ||
" sit amet, consectetur adipiscing elit. Aliquam nec." | ||
), | ||
} | ||
) | ||
b: Optional["Root.B"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
"doc": "This is a second root type field documentation.", | ||
} | ||
) | ||
c: Optional[RootEnum] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
d: Optional["Root.D"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
|
||
@dataclass | ||
class A: | ||
""" | ||
This is an inner type documentation. | ||
""" | ||
sub_a: Optional[str] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
"doc": ( | ||
"This is an inner type field documentation.\nLorem ipsum dolor" | ||
" sit amet, consectetur adipiscing elit. Vivamus efficitur." | ||
), | ||
} | ||
) | ||
|
||
class B(Enum): | ||
YES = "Yes" | ||
NO = "No" | ||
|
||
B.YES.__doc__ = ( | ||
"This is an inner enum member documentation. Lorem ipsum dolor sit amet, " | ||
"consectetur adipiscing elit. Etiam mollis." | ||
) | ||
B.NO.__doc__ = "Lorem ipsum dolor" | ||
|
||
class D(Enum): | ||
TRUE_VALUE = "true" | ||
FALSE_VALUE = "false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from tests.fixtures.docstrings.google.schema import ( | ||
Root, | ||
RootEnum, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
from dataclasses import dataclass, field | ||
from enum import Enum | ||
from typing import Optional | ||
|
||
__NAMESPACE__ = "urn:books" | ||
|
||
|
||
class RootEnum(Enum): | ||
""" | ||
Attributes | ||
A: Lorem ipsum dolor | ||
B: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi | ||
dapibus. | ||
""" | ||
A = "A" | ||
B = "B" | ||
|
||
|
||
@dataclass | ||
class Root: | ||
"""This is the root type documentation. Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit. Morbi dapibus. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec | ||
imperdiet lacus sed sagittis scelerisque. Ut sodales metus: "sit", | ||
"amet", "lectus" | ||
Attributes | ||
a: This is an inner type field documentation. Lorem ipsum dolor sit | ||
amet, consectetur adipiscing elit. Aliquam nec. | ||
b: This is a second root type field documentation. | ||
c: | ||
d: | ||
""" | ||
class Meta: | ||
namespace = "urn:books" | ||
|
||
a: Optional["Root.A"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
b: Optional["Root.B"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
c: Optional[RootEnum] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
d: Optional["Root.D"] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
|
||
@dataclass | ||
class A: | ||
""" | ||
This is an inner type documentation. | ||
Attributes | ||
sub_a: This is an inner type field documentation. Lorem ipsum dolor | ||
sit amet, consectetur adipiscing elit. Vivamus efficitur. | ||
""" | ||
sub_a: Optional[str] = field( | ||
default=None, | ||
metadata={ | ||
"type": "Element", | ||
"namespace": "", | ||
"required": True, | ||
} | ||
) | ||
|
||
class B(Enum): | ||
""" | ||
Attributes | ||
YES: This is an inner enum member documentation. Lorem ipsum dolor | ||
sit amet, consectetur adipiscing elit. Etiam mollis. | ||
NO: Lorem ipsum dolor | ||
""" | ||
YES = "Yes" | ||
NO = "No" | ||
|
||
class D(Enum): | ||
TRUE_VALUE = "true" | ||
FALSE_VALUE = "false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from tests.fixtures.docstrings.numpy.schema import ( | ||
Root, | ||
RootEnum, | ||
) |
Oops, something went wrong.