| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7b767f9 commit 9f9e6b5
18 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,6 +45,9 @@ htmlcov | |||
| 45 | 45 | # JetBrains | |
| 46 | 46 | .idea | |
| 47 | 47 | ||
| 48 | + # VS Code | ||
| 49 | + .vscode | ||
| 50 | + | ||
| 48 | 51 | # Built documentation | |
| 49 | 52 | docs/_build | |
| 50 | 53 | docs/_build_doc2dash | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 107 | 107 | kwargs: Additional arguments to pass to the constructor. | |
| 108 | 108 | ||
| 109 | 109 | Returns: | |
| 110 | - {@api.name}: The constructed client. | ||
| 110 | + {{ service.client_name }}: The constructed client. | ||
| 111 | 111 | """ | |
| 112 | 112 | credentials = service_account.Credentials.from_service_account_info(info) | |
| 113 | 113 | kwargs["credentials"] = credentials | |
@@ -125,7 +125,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 125 | 125 | kwargs: Additional arguments to pass to the constructor. | |
| 126 | 126 | ||
| 127 | 127 | Returns: | |
| 128 | - {@api.name}: The constructed client. | ||
| 128 | + {{ service.client_name }}: The constructed client. | ||
| 129 | 129 | """ | |
| 130 | 130 | credentials = service_account.Credentials.from_service_account_file( | |
| 131 | 131 | filename) | |
@@ -188,7 +188,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 188 | 188 | transport (Union[str, ~.{{ service.name }}Transport]): The | |
| 189 | 189 | transport to use. If set to None, a transport is chosen | |
| 190 | 190 | automatically. | |
| 191 | - client_options (client_options_lib.ClientOptions): Custom options for the | ||
| 191 | + client_options (google.api_core.client_options.ClientOptions): Custom options for the | ||
| 192 | 192 | client. It won't take effect if a ``transport`` instance is provided. | |
| 193 | 193 | (1) The ``api_endpoint`` property can be used to override the | |
| 194 | 194 | default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT | |
@@ -306,7 +306,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 306 | 306 | {{ method.input.meta.doc|wrap(width=72, offset=36, indent=16) }} | |
| 307 | 307 | {% for key, field in method.flattened_fields.items() -%} | |
| 308 | 308 | {{ field.name }} (:class:`{{ field.ident.sphinx }}`): | |
| 309 | - {{ field.meta.doc|rst(width=72, indent=16, nl=False) }} | ||
| 309 | + {{ field.meta.doc|rst(width=72, indent=16) }} | ||
| 310 | 310 | This corresponds to the ``{{ key }}`` field | |
| 311 | 311 | on the ``request`` instance; if ``request`` is provided, this | |
| 312 | 312 | should not be set. | |
@@ -329,7 +329,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 329 | 329 | {%- else %} | |
| 330 | 330 | Iterable[{{ method.client_output.ident.sphinx }}]: | |
| 331 | 331 | {%- endif %} | |
| 332 | - {{ method.client_output.meta.doc|rst(width=72, indent=16) }} | ||
| 332 | + {{ method.client_output.meta.doc|rst(width=72, indent=16, source_format='rst') }} | ||
| 333 | 333 | {%- endif %} | |
| 334 | 334 | """ | |
| 335 | 335 | {%- if not method.client_streaming %} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,3 +3,4 @@ Types for {{ api.naming.long_name }} {{ api.naming.version }} API | |||
| 3 | 3 | ||
| 4 | 4 | .. automodule:: {{ api.naming.namespace|join('.')|lower }}.{{ api.naming.versioned_module_name }}.types | |
| 5 | 5 | :members: | |
| 6 | + :undoc-members: | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + dl.field-list > dt { | ||
| 2 | + min-width: 100px | ||
| 3 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,7 +165,7 @@ html_theme_options = { | |||
| 165 | 165 | # Add any paths that contain custom static files (such as style sheets) here, | |
| 166 | 166 | # relative to this directory. They are copied after the builtin static files, | |
| 167 | 167 | # so a file named "default.css" will overwrite the builtin "default.css". | |
| 168 | - # html_static_path = [] | ||
| 168 | + html_static_path = ["_static"] | ||
| 169 | 169 | ||
| 170 | 170 | # Add any extra paths that contain custom files (such as robots.txt or | |
| 171 | 171 | # .htaccess) here, relative to this directory. These files are copied | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -173,9 +173,22 @@ def python_import(self) -> imp.Import: | |||
| 173 | 173 | @property | |
| 174 | 174 | def sphinx(self) -> str: | |
| 175 | 175 | """Return the Sphinx identifier for this type.""" | |
| 176 | - if self.module: | ||
| 177 | - return f'~.{self}' | ||
| 178 | - return self.name | ||
| 176 | + | ||
| 177 | + if not self.api_naming: | ||
| 178 | + if self.package: | ||
| 179 | + return '.'.join(self.package + (self.module, self.name)) | ||
| 180 | + else: | ||
| 181 | + return str(self) | ||
| 182 | + | ||
| 183 | + # Check if this is a generated type | ||
| 184 | + # Use the original module name rather than the module_alias | ||
| 185 | + if self.proto_package.startswith(self.api_naming.proto_package): | ||
| 186 | + return '.'.join(self.api_naming.module_namespace + ( | ||
| 187 | + self.api_naming.versioned_module_name, | ||
| 188 | + ) + self.subpackage + ('types',) + self.parent + (self.name, )) | ||
| 189 | + | ||
| 190 | + # Anything left is a standard _pb2 type | ||
| 191 | + return f'{self.proto_package}.{self.module}_pb2.{self.name}' | ||
| 179 | 192 | ||
| 180 | 193 | @property | |
| 181 | 194 | def subpackage(self) -> Tuple[str, ...]: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -690,7 +690,7 @@ def _client_output(self, enable_asyncio: bool): | |||
| 690 | 690 | documentation=utils.doc( | |
| 691 | 691 | 'An object representing a long-running operation. \n\n' | |
| 692 | 692 | 'The result type for the operation will be ' | |
| 693 | - ':class:`{ident}`: {doc}'.format( | ||
| 693 | + ':class:`{ident}` {doc}'.format( | ||
| 694 | 694 | doc=self.lro.response_type.meta.doc, | |
| 695 | 695 | ident=self.lro.response_type.ident.sphinx, | |
| 696 | 696 | ), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,7 +140,7 @@ class {{ service.async_client_name }}: | |||
| 140 | 140 | {{ method.input.meta.doc|wrap(width=72, offset=36, indent=16) }} | |
| 141 | 141 | {% for key, field in method.flattened_fields.items() -%} | |
| 142 | 142 | {{ field.name }} (:class:`{{ field.ident.sphinx }}`): | |
| 143 | - {{ field.meta.doc|rst(width=72, indent=16, nl=False) }} | ||
| 143 | + {{ field.meta.doc|rst(width=72, indent=16) }} | ||
| 144 | 144 | This corresponds to the ``{{ key }}`` field | |
| 145 | 145 | on the ``request`` instance; if ``request`` is provided, this | |
| 146 | 146 | should not be set. | |
@@ -163,7 +163,7 @@ class {{ service.async_client_name }}: | |||
| 163 | 163 | {%- else %} | |
| 164 | 164 | AsyncIterable[{{ method.client_output_async.ident.sphinx }}]: | |
| 165 | 165 | {%- endif %} | |
| 166 | - {{ method.client_output_async.meta.doc|rst(width=72, indent=16) }} | ||
| 166 | + {{ method.client_output_async.meta.doc|rst(width=72, indent=16, source_format='rst') }} | ||
| 167 | 167 | {%- endif %} | |
| 168 | 168 | """ | |
| 169 | 169 | {%- if not method.client_streaming %} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,7 +123,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 123 | 123 | kwargs: Additional arguments to pass to the constructor. | |
| 124 | 124 | ||
| 125 | 125 | Returns: | |
| 126 | - {@api.name}: The constructed client. | ||
| 126 | + {{ service.client_name }}: The constructed client. | ||
| 127 | 127 | """ | |
| 128 | 128 | credentials = service_account.Credentials.from_service_account_info(info) | |
| 129 | 129 | kwargs["credentials"] = credentials | |
@@ -141,7 +141,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 141 | 141 | kwargs: Additional arguments to pass to the constructor. | |
| 142 | 142 | ||
| 143 | 143 | Returns: | |
| 144 | - {@api.name}: The constructed client. | ||
| 144 | + {{ service.client_name }}: The constructed client. | ||
| 145 | 145 | """ | |
| 146 | 146 | credentials = service_account.Credentials.from_service_account_file( | |
| 147 | 147 | filename) | |
@@ -202,10 +202,10 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 202 | 202 | credentials identify the application to the service; if none | |
| 203 | 203 | are specified, the client will attempt to ascertain the | |
| 204 | 204 | credentials from the environment. | |
| 205 | - transport (Union[str, ~.{{ service.name }}Transport]): The | ||
| 205 | + transport (Union[str, {{ service.name }}Transport]): The | ||
| 206 | 206 | transport to use. If set to None, a transport is chosen | |
| 207 | 207 | automatically. | |
| 208 | - client_options (client_options_lib.ClientOptions): Custom options for the | ||
| 208 | + client_options (google.api_core.client_options.ClientOptions): Custom options for the | ||
| 209 | 209 | client. It won't take effect if a ``transport`` instance is provided. | |
| 210 | 210 | (1) The ``api_endpoint`` property can be used to override the | |
| 211 | 211 | default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT | |
@@ -322,18 +322,18 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 322 | 322 | ||
| 323 | 323 | Args: | |
| 324 | 324 | {%- if not method.client_streaming %} | |
| 325 | - request (:class:`{{ method.input.ident.sphinx }}`): | ||
| 325 | + request ({{ method.input.ident.sphinx }}): | ||
| 326 | 326 | The request object.{{ ' ' -}} | |
| 327 | 327 | {{ method.input.meta.doc|wrap(width=72, offset=36, indent=16) }} | |
| 328 | 328 | {% for key, field in method.flattened_fields.items() -%} | |
| 329 | - {{ field.name }} (:class:`{{ field.ident.sphinx }}`): | ||
| 330 | - {{ field.meta.doc|rst(width=72, indent=16, nl=False) }} | ||
| 329 | + {{ field.name }} ({{ field.ident.sphinx }}): | ||
| 330 | + {{ field.meta.doc|rst(width=72, indent=16) }} | ||
| 331 | 331 | This corresponds to the ``{{ key }}`` field | |
| 332 | 332 | on the ``request`` instance; if ``request`` is provided, this | |
| 333 | 333 | should not be set. | |
| 334 | 334 | {% endfor -%} | |
| 335 | 335 | {%- else %} | |
| 336 | - requests (Iterator[`{{ method.input.ident.sphinx }}`]): | ||
| 336 | + requests (Iterator[{{ method.input.ident.sphinx }}]): | ||
| 337 | 337 | The request object iterator.{{ ' ' -}} | |
| 338 | 338 | {{ method.input.meta.doc|wrap(width=72, offset=36, indent=16) }} | |
| 339 | 339 | {%- endif %} | |
@@ -350,7 +350,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): | |||
| 350 | 350 | {%- else %} | |
| 351 | 351 | Iterable[{{ method.client_output.ident.sphinx }}]: | |
| 352 | 352 | {%- endif %} | |
| 353 | - {{ method.client_output.meta.doc|rst(width=72, indent=16) }} | ||
| 353 | + {{ method.client_output.meta.doc|rst(width=72, indent=16, source_format='rst') }} | ||
| 354 | 354 | {%- endif %} | |
| 355 | 355 | """ | |
| 356 | 356 | {%- if not method.client_streaming %} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,9 +45,9 @@ class {{ method.name }}Pager: | |||
| 45 | 45 | Args: | |
| 46 | 46 | method (Callable): The method that was originally called, and | |
| 47 | 47 | which instantiated this pager. | |
| 48 | - request (:class:`{{ method.input.ident.sphinx }}`): | ||
| 48 | + request ({{ method.input.ident.sphinx }}): | ||
| 49 | 49 | The initial request object. | |
| 50 | - response (:class:`{{ method.output.ident.sphinx }}`): | ||
| 50 | + response ({{ method.output.ident.sphinx }}): | ||
| 51 | 51 | The initial response object. | |
| 52 | 52 | metadata (Sequence[Tuple[str, str]]): Strings which should be | |
| 53 | 53 | sent along with the request as metadata. | |
@@ -104,9 +104,9 @@ class {{ method.name }}AsyncPager: | |||
| 104 | 104 | Args: | |
| 105 | 105 | method (Callable): The method that was originally called, and | |
| 106 | 106 | which instantiated this pager. | |
| 107 | - request (:class:`{{ method.input.ident.sphinx }}`): | ||
| 107 | + request ({{ method.input.ident.sphinx }}): | ||
| 108 | 108 | The initial request object. | |
| 109 | - response (:class:`{{ method.output.ident.sphinx }}`): | ||
| 109 | + response ({{ method.output.ident.sphinx }}): | ||
| 110 | 110 | The initial response object. | |
| 111 | 111 | metadata (Sequence[Tuple[str, str]]): Strings which should be | |
| 112 | 112 | sent along with the request as metadata. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments