| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ca15a7e commit 1f4c286
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,6 +131,7 @@ replacements: | |||
| 131 | 131 | count: 1 | |
| 132 | 132 | - paths: [ | |
| 133 | 133 | packages/google-cloud-speech/google/cloud/speech_v1/__init__.py, | |
| 134 | + packages/google-cloud-speech/google/cloud/speech_v1p1beta1/__init__.py, | ||
| 134 | 135 | ] | |
| 135 | 136 | before: | | |
| 136 | 137 | \) | |
@@ -140,24 +141,16 @@ replacements: | |||
| 140 | 141 | ) | |
| 141 | 142 | ||
| 142 | 143 | from google.cloud.speech_v1.helpers import SpeechHelpers\n\n | |
| 143 | - class SpeechClient(SpeechHelpers, SpeechClient): | ||
| 144 | - __doc__ = SpeechClient.__doc__\n\n | ||
| 145 | - __all__ = ( | ||
| 146 | - count: 1 | ||
| 147 | - - paths: [ | ||
| 148 | - packages/google-cloud-speech/google/cloud/speech_v1p1beta1/__init__.py, | ||
| 149 | - ] | ||
| 150 | - before: | | ||
| 151 | - \)\n | ||
| 152 | - __all__ = \( | ||
| 153 | - after: | | ||
| 154 | - )\n | ||
| 155 | - from google.cloud.speech_v1.helpers import SpeechHelpers | ||
| 156 | - \n | ||
| 157 | - class SpeechClient(SpeechHelpers, SpeechClient): | ||
| 144 | + # This class merges the auto-generated GAPIC client with handwritten helper methods. | ||
| 145 | + # We ignore [misc] because mypy is flagging that both parent classes have a method | ||
| 146 | + # named `streaming_recognize`, | ||
| 147 | + # but their type signatures don't match. | ||
| 148 | + # We ignore [no-redef] because of the name shadow with SpeechClient. We don't want | ||
| 149 | + # to expose the GAPIC client without the helpers. | ||
| 150 | + class SpeechClient(SpeechHelpers, SpeechClient): # type: ignore[no-redef, misc] | ||
| 158 | 151 | __doc__ = SpeechClient.__doc__\n\n | |
| 159 | 152 | __all__ = ( | |
| 160 | - count: 1 | ||
| 153 | + count: 2 | ||
| 161 | 154 | - paths: [ | |
| 162 | 155 | packages/google-cloud-speech/google/cloud/speech/__init__.py, | |
| 163 | 156 | ] | |
@@ -301,3 +294,14 @@ replacements: | |||
| 301 | 294 | "pandas-stubs", | |
| 302 | 295 | ) | |
| 303 | 296 | count: 1 | |
| 297 | + - paths: [ | ||
| 298 | + packages/google-cloud-monitoring/noxfile.py, | ||
| 299 | + ] | ||
| 300 | + before: | | ||
| 301 | + "types-protobuf", | ||
| 302 | + \ \) | ||
| 303 | + after: | | ||
| 304 | + "types-protobuf", | ||
| 305 | + "pandas-stubs", | ||
| 306 | + ) | ||
| 307 | + count: 1 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ | |||
| 19 | 19 | try: | |
| 20 | 20 | import pandas | |
| 21 | 21 | except ImportError: # pragma: NO COVER | |
| 22 | - pandas = None | ||
| 22 | + pandas = None # type: ignore[assignment] | ||
| 23 | 23 | ||
| 24 | 24 | from google.cloud import monitoring_v3 | |
| 25 | 25 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,6 +101,7 @@ def mypy(session): | |||
| 101 | 101 | "mypy<1.16.0", | |
| 102 | 102 | "types-requests", | |
| 103 | 103 | "types-protobuf", | |
| 104 | + "pandas-stubs", | ||
| 104 | 105 | ) | |
| 105 | 106 | session.install(".") | |
| 106 | 107 | session.run( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,13 +17,15 @@ | |||
| 17 | 17 | ||
| 18 | 18 | from __future__ import absolute_import | |
| 19 | 19 | ||
| 20 | + from typing import List | ||
| 21 | + | ||
| 20 | 22 | from google.api_core.protobuf_helpers import get_messages | |
| 21 | 23 | ||
| 22 | 24 | from google.cloud.orgpolicy.v1 import orgpolicy_pb2 | |
| 23 | 25 | ||
| 24 | 26 | _modules = [orgpolicy_pb2] | |
| 25 | 27 | ||
| 26 | - names = [] | ||
| 28 | + names: List[str] = [] | ||
| 27 | 29 | ||
| 28 | 30 | for module in _modules: | |
| 29 | 31 | for name, message in get_messages(module).items(): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,7 +169,13 @@ def _get_version(dependency_name): | |||
| 169 | 169 | from google.cloud.speech_v1.helpers import SpeechHelpers | |
| 170 | 170 | ||
| 171 | 171 | ||
| 172 | - class SpeechClient(SpeechHelpers, SpeechClient): | ||
| 172 | + # This class merges the auto-generated GAPIC client with handwritten helper methods. | ||
| 173 | + # We ignore [misc] because mypy is flagging that both parent classes have a method | ||
| 174 | + # named `streaming_recognize`, | ||
| 175 | + # but their type signatures don't match. | ||
| 176 | + # We ignore [no-redef] because of the name shadow with SpeechClient. We don't want | ||
| 177 | + # to expose the GAPIC client without the helpers. | ||
| 178 | + class SpeechClient(SpeechHelpers, SpeechClient): # type: ignore[no-redef, misc] | ||
| 173 | 179 | __doc__ = SpeechClient.__doc__ | |
| 174 | 180 | ||
| 175 | 181 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,7 +169,13 @@ def _get_version(dependency_name): | |||
| 169 | 169 | from google.cloud.speech_v1.helpers import SpeechHelpers | |
| 170 | 170 | ||
| 171 | 171 | ||
| 172 | - class SpeechClient(SpeechHelpers, SpeechClient): | ||
| 172 | + # This class merges the auto-generated GAPIC client with handwritten helper methods. | ||
| 173 | + # We ignore [misc] because mypy is flagging that both parent classes have a method | ||
| 174 | + # named `streaming_recognize`, | ||
| 175 | + # but their type signatures don't match. | ||
| 176 | + # We ignore [no-redef] because of the name shadow with SpeechClient. We don't want | ||
| 177 | + # to expose the GAPIC client without the helpers. | ||
| 178 | + class SpeechClient(SpeechHelpers, SpeechClient): # type: ignore[no-redef, misc] | ||
| 173 | 179 | __doc__ = SpeechClient.__doc__ | |
| 174 | 180 | ||
| 175 | 181 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ | |||
| 15 | 15 | from __future__ import absolute_import | |
| 16 | 16 | ||
| 17 | 17 | from google.api_core import protobuf_helpers as protobuf | |
| 18 | - import proto | ||
| 18 | + import proto # type: ignore | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | class VisionHelpers(object): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments