Skip to content

Commit

Permalink
fix: suppress type error for fallback def of OptionalRetry (#1065)
Browse files Browse the repository at this point in the history
Introduced in #1032.
  • Loading branch information
tseaver authored Nov 3, 2021
1 parent 185ecc7 commit e47faa6
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ from google.oauth2 import service_account # type: ignore

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

{% filter sort_lines %}
{% for method in service.methods.values() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ from google.oauth2 import service_account # type: ignore

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

{% filter sort_lines %}
{% for method in service.methods.values() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ from google.oauth2 import service_account # type: ignore

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

{% filter sort_lines %}
{% for method in service.methods.values() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import warnings

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

{% extends '_base.py.j2' %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.iam.credentials_v1.types import common
from google.protobuf import duration_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.iam.credentials_v1.types import common
from google.protobuf import duration_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.cloud.logging_v2.services.config_service_v2 import pagers
from google.cloud.logging_v2.types import logging_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.cloud.logging_v2.services.config_service_v2 import pagers
from google.cloud.logging_v2.types import logging_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api import monitored_resource_pb2 # type: ignore
from google.cloud.logging_v2.services.logging_service_v2 import pagers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api import monitored_resource_pb2 # type: ignore
from google.cloud.logging_v2.services.logging_service_v2 import pagers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api import distribution_pb2 # type: ignore
from google.api import metric_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api import distribution_pb2 # type: ignore
from google.api import metric_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.Retry, object]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down

0 comments on commit e47faa6

Please sign in to comment.