Skip to content

Commit ab4657e

Browse files
authored
chore: regenerate grafeas (#15537)
Re-generate `grafeas` following #15532 which mentions `Generation failed for grafeas`
1 parent 1ef3ea0 commit ab4657e

22 files changed

Lines changed: 70 additions & 39 deletions

File tree

.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ replacements:
6161
\ Returns:
6262
\ GrafeasAsyncClient: The constructed client.
6363
\ """
64-
\ sa_file_func = GrafeasClient.from_service_account_file.__func__ # type: ignore
65-
\ return sa_file_func\(GrafeasAsyncClient, filename, \*args, \*\*kwargs\)
64+
\ return GrafeasClient.from_service_account_file.__func__\(GrafeasAsyncClient, filename, \*args, \*\*kwargs\) # type: ignore
6665
\
6766
\ from_service_account_json = from_service_account_file
6867
\

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3661,7 +3661,7 @@ libraries:
36613661
tag_format: '{id}-v{version}'
36623662
- id: grafeas
36633663
version: 1.19.1
3664-
last_generated_commit: cfe62b3c5ceb9f81879c61480f26707980534462
3664+
last_generated_commit: 725496d32a359a40dd773995d3fda0342b440e15
36653665
apis:
36663666
- path: grafeas/v1
36673667
service_config: grafeas_v1.yaml

packages/grafeas/docs/conf.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
#
16-
#
15+
##
1716
# grafeas documentation build configuration file
1817
#
1918
# This file is execfile()d with the current directory set to its
@@ -25,9 +24,11 @@
2524
# All configuration values have a default; values that are commented out
2625
# serve to show the default.
2726

27+
import logging
2828
import os
2929
import shlex
3030
import sys
31+
from typing import Any
3132

3233
# If extensions (or modules to document with autodoc) are in another directory,
3334
# add these directories to sys.path here. If the directory is relative to the
@@ -383,3 +384,34 @@
383384
napoleon_use_ivar = False
384385
napoleon_use_param = True
385386
napoleon_use_rtype = True
387+
388+
389+
# Setup for sphinx behaviors such as warning filters.
390+
class UnexpectedUnindentFilter(logging.Filter):
391+
"""Filter out warnings about unexpected unindentation following bullet lists."""
392+
393+
def filter(self, record: logging.LogRecord) -> bool:
394+
"""Filter the log record.
395+
396+
Args:
397+
record (logging.LogRecord): The log record.
398+
399+
Returns:
400+
bool: False to suppress the warning, True to allow it.
401+
"""
402+
msg = record.getMessage()
403+
if "Bullet list ends without a blank line" in msg:
404+
return False
405+
return True
406+
407+
408+
def setup(app: Any) -> None:
409+
"""Setup the Sphinx application.
410+
411+
Args:
412+
app (Any): The Sphinx application.
413+
"""
414+
# Sphinx's logger is hierarchical. Adding a filter to the
415+
# root 'sphinx' logger will catch warnings from all sub-loggers.
416+
logger = logging.getLogger("sphinx")
417+
logger.addFilter(UnexpectedUnindentFilter())

packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
except AttributeError: # pragma: NO COVER
4545
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
4646

47-
from google.protobuf import field_mask_pb2 # type: ignore
48-
from google.protobuf import timestamp_pb2 # type: ignore
47+
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
48+
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
4949

5050
from grafeas.grafeas_v1.services.grafeas import pagers
5151
from grafeas.grafeas_v1.types import (

packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161

6262
_LOGGER = std_logging.getLogger(__name__)
6363

64-
from google.protobuf import field_mask_pb2 # type: ignore
65-
from google.protobuf import timestamp_pb2 # type: ignore
64+
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
65+
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
6666

6767
from grafeas.grafeas_v1.services.grafeas import pagers
6868
from grafeas.grafeas_v1.types import (

packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from google.auth import credentials as ga_credentials # type: ignore
2525
from google.oauth2 import service_account # type: ignore
2626
import google.protobuf
27-
from google.protobuf import empty_pb2 # type: ignore
27+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
2828

2929
from grafeas.grafeas_v1 import gapic_version as package_version
3030
from grafeas.grafeas_v1.types import grafeas

packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import google.auth # type: ignore
2424
from google.auth import credentials as ga_credentials # type: ignore
2525
from google.auth.transport.grpc import SslCredentials # type: ignore
26-
from google.protobuf import empty_pb2 # type: ignore
26+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
2727
from google.protobuf.json_format import MessageToJson
2828
import google.protobuf.message
2929
import grpc # type: ignore

packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/grpc_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from google.api_core import retry_async as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.auth.transport.grpc import SslCredentials # type: ignore
28-
from google.protobuf import empty_pb2 # type: ignore
28+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
2929
from google.protobuf.json_format import MessageToJson
3030
import google.protobuf.message
3131
import grpc # type: ignore

packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/rest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.auth.transport.requests import AuthorizedSession # type: ignore
2727
import google.protobuf
28-
from google.protobuf import empty_pb2 # type: ignore
2928
from google.protobuf import json_format
29+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
3030
from requests import __version__ as requests_version
3131

3232
from grafeas.grafeas_v1.types import grafeas
@@ -1567,7 +1567,7 @@ def __call__(
15671567
)
15681568
method = transcoded_request["method"]
15691569
try:
1570-
request_payload = json_format.MessageToJson(request)
1570+
request_payload = type(request).to_json(request)
15711571
except:
15721572
request_payload = None
15731573
http_request = {
@@ -1679,7 +1679,7 @@ def __call__(
16791679
)
16801680
method = transcoded_request["method"]
16811681
try:
1682-
request_payload = json_format.MessageToJson(request)
1682+
request_payload = type(request).to_json(request)
16831683
except:
16841684
request_payload = None
16851685
http_request = {

packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/rest_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
1919

2020
from google.api_core import gapic_v1, path_template
21-
from google.protobuf import empty_pb2 # type: ignore
2221
from google.protobuf import json_format
22+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
2323

2424
from grafeas.grafeas_v1.types import grafeas
2525

0 commit comments

Comments
 (0)