You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The members of a collections.namedtuple have no semantic information in their docstrings:
>>>importcollections>>>Foo=collections.namedtuple("Foo", ["bar", "baz", "qux"], verbose=True)
classFoo(tuple):
'Foo(bar, baz, qux)'__slots__= ()
_fields= ('bar', 'baz', 'qux')
def__new__(_cls, bar, baz, qux):
'Create new instance of Foo(bar, baz, qux)'return_tuple.__new__(_cls, (bar, baz, qux))
@classmethoddef_make(cls, iterable, new=tuple.__new__, len=len):
'Make a new Foo object from a sequence or iterable'result=new(cls, iterable)
iflen(result) !=3:
raiseTypeError('Expected 3 arguments, got %d'%len(result))
returnresultdef__repr__(self):
'Return a nicely formatted representation string'return'Foo(bar=%r, baz=%r, qux=%r)'%selfdef_asdict(self):
'Return a new OrderedDict which maps field names to their values'returnOrderedDict(zip(self._fields, self))
def_replace(_self, **kwds):
'Return a new Foo object replacing specified fields with new values'result=_self._make(map(kwds.pop, ('bar', 'baz', 'qux'), _self))
ifkwds:
raiseValueError('Got unexpected field names: %r'%kwds.keys())
returnresultdef__getnewargs__(self):
'Return self as a plain tuple. Used by copy and pickle.'returntuple(self)
__dict__=_property(_asdict)
def__getstate__(self):
'Exclude the OrderedDict from pickling'passbar=_property(_itemgetter(0), doc='Alias for field number 0')
baz=_property(_itemgetter(1), doc='Alias for field number 1')
qux=_property(_itemgetter(2), doc='Alias for field number 2')
The text was updated successfully, but these errors were encountered:
@lukesneeringer Assigning to you, but please feel free to reassign. Also, I was unsure whether this would be fixed in gapic-generator, or if the fix will be provided as part of gapic-generator-python.
@plamut Rather than adding those docstrings in synth.py, it would be preferable to have the generator use whatever comments are in the .proto files for the enums to generate them upstream.
From: googleapis/google-cloud-python#7043
The members of a
collections.namedtuple
have no semantic information in their docstrings:The text was updated successfully, but these errors were encountered: