Skip to content

Commit 34fcaab

Browse files
committed
Use google style docstrings
1 parent 93460a7 commit 34fcaab

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

domains/books/entities/cloudevent_base.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ def type_field(default: typing.Union[str, None] = None) -> typing.Any:
1111
Helper function to generate the CloudEvent `type` field,
1212
optionally with a default value.
1313
14-
:param default: The default value of the field
15-
:return:
14+
Args:
15+
default: The default value of the field
16+
17+
Returns:
18+
The pydantic field object
1619
"""
1720
field = pydantic.Field(
1821
title="Event Type",
@@ -33,8 +36,11 @@ def source_field(default: typing.Union[str, None] = None) -> typing.Any:
3336
Helper function to generate the CloudEvent `source` field,
3437
optionally with a default value.
3538
36-
:param default: The default value of the field
37-
:return:
39+
Args:
40+
default: The default value of the field
41+
42+
Returns:
43+
The pydantic field object
3844
"""
3945
field = pydantic.Field(
4046
title="Event Source",
@@ -71,9 +77,12 @@ def dataschema_field(
7177
Helper function to generate the CloudEvent `dataschema` field,
7278
pointing to the event schema url.
7379
74-
:param base_url: The base URL for event dataschema
75-
:param event_name: The event_name value of the field
76-
:return:
80+
Args:
81+
base_url: The base URL for event dataschema
82+
event_name: The event_name value of the field
83+
84+
Returns:
85+
The pydantic field object
7786
"""
7887
content = f"{base_url}/{event_name or 'some_event'}"
7988
schema = pydantic.Field(
@@ -114,8 +123,11 @@ def subject_field(default: typing.Union[str, None] = None) -> typing.Any:
114123
Helper function to generate the CloudEvent `subject` field,
115124
optionally with a default value.
116125
117-
:param default: The default value of the field
118-
:return:
126+
Args:
127+
default: The default value of the field
128+
129+
Returns:
130+
The pydantic field object
119131
"""
120132
field = pydantic.Field(
121133
title="Event Subject",

0 commit comments

Comments
 (0)