Title: fixup_pubsub_v1_keywords.py generates incorrect output in some cases · Issue #199 · googleapis/python-pubsub · GitHub
Open Graph Title: fixup_pubsub_v1_keywords.py generates incorrect output in some cases · Issue #199 · googleapis/python-pubsub
X Title: fixup_pubsub_v1_keywords.py generates incorrect output in some cases · Issue #199 · googleapis/python-pubsub
Description: I just tried the fixup script and ran into a few issues. It generates this change even though PublisherClient.publish does not take the new style parameters: - publisher_client.publish(topic, bytes(json.dumps(message), 'utf-8')) + publis...
Open Graph Description: I just tried the fixup script and ran into a few issues. It generates this change even though PublisherClient.publish does not take the new style parameters: - publisher_client.publish(topic, bytes...
X Description: I just tried the fixup script and ran into a few issues. It generates this change even though PublisherClient.publish does not take the new style parameters: - publisher_client.publish(topic, bytes...
Opengraph URL: https://github.com/googleapis/python-pubsub/issues/199
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fixup_pubsub_v1_keywords.py generates incorrect output in some cases ","articleBody":"I just tried the fixup script and ran into a few issues.\r\n\r\n1. It generates this change even though `PublisherClient.publish` does not take the new style parameters:\r\n```diff\r\n- publisher_client.publish(topic, bytes(json.dumps(message), 'utf-8'))\r\n+ publisher_client.publish(request = {'topic': topic, 'messages': bytes(json.dumps(message), 'utf-8')})\r\n```\r\n2. It generates this change even though `request` and keyword args are documented to be mutually exclusive:\r\n```diff\r\n- response = subscriber.pull(subscription_path, max_messages=NUM_MESSAGES, timeout=TIMEOUT)\r\n+ response = subscriber.pull(\r\n+ request = {'subscription': subscription_path, 'max_messages': NUM_MESSAGES}, timeout=TIMEOUT,\r\n+ )\r\n```\r\n3. all of the generated `request` keyword arguments break pep8 (they should not have spaces around `=`)\r\n\r\n\r\nStylistically, I find the keyword arguments better to read than all of the inline dicts for the `request` syntax. It'd be great if the tool had an option to emit the keyword args version.","author":{"url":"https://github.com/rvandegrift","@type":"Person","name":"rvandegrift"},"datePublished":"2020-09-17T22:59:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/199/python-pubsub/issues/199"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b76eeeca-c7f6-2a07-5591-97ac3b2dfd45 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF6A:165D8F:292AC97:384537C:6A505339 |
| html-safe-nonce | e1d317ccacd588c506f0df264c04f9dca098f440d7416df108182ee1c634be98 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjZBOjE2NUQ4RjoyOTJBQzk3OjM4NDUzN0M6NkE1MDUzMzkiLCJ2aXNpdG9yX2lkIjoiNTI2MzgzODMyMDA3NDYzNzM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0486aacc50df4b90e1b4e34711ad1c83b137710f6949b385bd79a10fc62ec661 |
| hovercard-subject-tag | issue:703961982 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-pubsub/199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1449c104cb7ea51630ff5744ac87603cfa957c42b199181a9608e817277b2bc4/googleapis/python-pubsub/issues/199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1449c104cb7ea51630ff5744ac87603cfa957c42b199181a9608e817277b2bc4/googleapis/python-pubsub/issues/199 |
| og:image:alt | I just tried the fixup script and ran into a few issues. It generates this change even though PublisherClient.publish does not take the new style parameters: - publisher_client.publish(topic, bytes... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rvandegrift |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992581 |
| octolytics-dimension-repository_nwo | googleapis/python-pubsub |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992581 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-pubsub |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5741a45fe07e5f377d0d4c524a92e3056acc51bb |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width