Skip to content

Commit

Permalink
Assorted synth fixups / cleanups (#6400)
Browse files Browse the repository at this point in the history
* Asset: Replace 'stable' -> 'latest' in docs links, caused by out-of-date synth.
* AutoML: fix copying generated docs.
* Bigtable: remove now-spurious fixup from 'synth.py'.
* DLP: remove now-spurious fixups from 'synth.py'.
* Monitoring: remove now-spurious fixups from 'synth.py'.
* Redis: remove now-spurious fixups from 'synth.py'.
* Speech: remove now-spurious fixups from 'synth.py'.
  • Loading branch information
tseaver authored Nov 7, 2018
1 parent 83db4cd commit 7255bd1
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions packages/google-cloud-monitoring/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
]
s.copy(v3_library, excludes=excludes)

# Correct calls to routing_header
# https://github.com/googleapis/gapic-generator/issues/2016
s.replace(
"google/cloud/*/gapic/*_client.py",
"routing_header\(",
"routing_header.to_grpc_metadata(")

# metadata in tests in none but should be empty list.
# https://github.com/googleapis/gapic-generator/issues/2014
s.replace(
Expand All @@ -54,19 +47,6 @@
' metadata = []\n'
' metadata = list(metadata)\n')


# empty objects trying to get attrs
# https://github.com/googleapis/gapic-generator/issues/2015
s.replace(
"google/cloud/*/gapic/*_client.py",
"(^ )(routing_header = google.api_core.gapic_v1.routing_header"
".to_grpc_metadata\(\n)"
"(\s+)(\[\('[a-z\_]*?\.name', )([a-z\_]*?)(.name\)\], \)\n)"
"(\s+metadata.append\(routing_header\)\n)",
"\g<1>if hasattr(\g<5>, 'name'):\n"
"\g<1> \g<2>\g<3> \g<4>\g<5>\g<6> \g<7>"
)

# Issues exist where python files should defined the source encoding
# https://github.com/googleapis/gapic-generator/issues/2097
files = ['google/cloud/monitoring_v3/proto/common_pb2.py']
Expand Down

0 comments on commit 7255bd1

Please sign in to comment.