Skip to content

Commit

Permalink
Correct references.
Browse files Browse the repository at this point in the history
  • Loading branch information
daspecster committed Jan 11, 2017
1 parent 631ece9 commit 46e6942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vision/google/cloud/vision/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _make_entity_from_pb(annotations):
:type annotations:
:class:`~google.cloud.grpc.vision.v1.image_annotator_pb2.EntityAnnotation`
:param annotations: gRPC instance of ``EntityAnnotation``.
:param annotations: protobuf instance of ``EntityAnnotation``.
:rtype: list
:returns: List of ``EntityAnnotation``.
Expand Down
9 changes: 5 additions & 4 deletions vision/google/cloud/vision/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,18 @@ def from_api_repr(cls, location_info):
return cls(latitude, longitude)

@classmethod
def from_pb(cls, response):
def from_pb(cls, location_info):
"""Factory: construct location information from Vision gRPC response.
:type response: :class:`~google.cloud.vision.v1.LocationInfo`
:param response: gRPC response of ``LocationInfo``.
:type location_info: :class:`~google.cloud.vision.v1.LocationInfo`
:param location_info: gRPC response of ``LocationInfo``.
:rtype: :class:`~google.cloud.vision.geometry.LocationInformation`
:returns: ``LocationInformation`` with populated latitude and
longitude.
"""
return cls(response.lat_lng.latitude, response.lat_lng.longitude)
return cls(location_info.lat_lng.latitude,
location_info.lat_lng.longitude)

@property
def latitude(self):
Expand Down

0 comments on commit 46e6942

Please sign in to comment.