| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
PR for samples changes, mostly in admin as it relied on gen surface. GoogleCloudPlatform/python-docs-samples#4858 |
Sorry, something went wrong.
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Generated by synthtool. DO NOT EDIT! |
There was a problem hiding this comment.
This is really a comment for the generator and not this particular PR, but in general, I'm in favor of clearly marking files which are generated. (I'm assuming this file is still generated.) The less detective work you can make a developer do, the better.
Sorry, something went wrong.
There was a problem hiding this comment.
This goes for everything under services and types, too. Or maybe it could be a README in those folders. But a clear delineation between generated and hand written code, I think, is helpful.
Sorry, something went wrong.
| """ | ||
| return entity_pb.properties.get_or_create(name) | ||
| properties = entity_pb.properties | ||
| try: |
There was a problem hiding this comment.
Later in the same file, you do the same thing at line 396 but in a different way. Maybe a function to standardize the spelling here would be in order.
def _unwrap(pb):
return getattr(pb, "_pb", pb)
Sorry, something went wrong.
|
Insofar as the only changes to handwritten code seem to be spelling changes to adapt to differences in the underlying generated code, this looks pretty good. Making which bits are generated glaringly obvious, I think, would be good. I don't see anything particularly alarming. The frequent use of ._pb unwrapping, though, does seem like a code smell. Granted, I'm really only looking at the diff here, so I'm maybe not seeing all the places where we don't need to unwrap the protos, but it does raise the question of why are we wrapping them if we're just going to unwrap them? The couple of spots where we don't know whether we have a wrapped or unwrapped proto are particularly smelly. Can the design to be tweaked so that consumers of protos are getting whichever version, wrapped or unwrapped, that they need? I realize this is probably a generator question and not a Datastore question. |
Sorry, something went wrong.
|
@chrisrossi Thank you very much for the review. I 100% agree with your feedback. I focused on not breaking any of the system tests and at times this has meant some sort of gross wrapping/unwrapping. I think there is opportunity to clean this up. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This uses the new microgenerator as the underlying transport for the cloud datastore client
files in services/, as well as tests/gapic, are gen'd
Major Changes: Discontinues python 2.7 support.
release-as: 2.0.0-dev1