Skip to content

Commit 9c50016

Browse files
committed
Make annotation constants private.
1 parent e222714 commit 9c50016

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/google-cloud-vision/google/cloud/vision/annotations.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
from google.cloud.vision.safe import SafeSearchAnnotation
2222

2323

24-
FACE_ANNOTATIONS = 'faceAnnotations'
25-
IMAGE_PROPERTIES_ANNOTATION = 'imagePropertiesAnnotation'
26-
SAFE_SEARCH_ANNOTATION = 'safeSearchAnnotation'
24+
_FACE_ANNOTATIONS = 'faceAnnotations'
25+
_IMAGE_PROPERTIES_ANNOTATION = 'imagePropertiesAnnotation'
26+
_SAFE_SEARCH_ANNOTATION = 'safeSearchAnnotation'
2727

2828
_KEY_MAP = {
29-
FACE_ANNOTATIONS: 'faces',
30-
IMAGE_PROPERTIES_ANNOTATION: 'properties',
29+
_FACE_ANNOTATIONS: 'faces',
30+
_IMAGE_PROPERTIES_ANNOTATION: 'properties',
3131
'labelAnnotations': 'labels',
3232
'landmarkAnnotations': 'landmarks',
3333
'logoAnnotations': 'logos',
34-
SAFE_SEARCH_ANNOTATION: 'safe_searches',
34+
_SAFE_SEARCH_ANNOTATION: 'safe_searches',
3535
'textAnnotations': 'texts'
3636
}
3737

@@ -105,13 +105,13 @@ def _entity_from_response_type(feature_type, results):
105105
:class:`~google.cloud.vision.safe.SafeSearchAnnotation`.
106106
"""
107107
detected_objects = []
108-
if feature_type == FACE_ANNOTATIONS:
108+
if feature_type == _FACE_ANNOTATIONS:
109109
detected_objects.extend(
110110
Face.from_api_repr(face) for face in results)
111-
elif feature_type == IMAGE_PROPERTIES_ANNOTATION:
111+
elif feature_type == _IMAGE_PROPERTIES_ANNOTATION:
112112
detected_objects.append(
113113
ImagePropertiesAnnotation.from_api_repr(results))
114-
elif feature_type == SAFE_SEARCH_ANNOTATION:
114+
elif feature_type == _SAFE_SEARCH_ANNOTATION:
115115
detected_objects.append(SafeSearchAnnotation.from_api_repr(results))
116116
else:
117117
for result in results:

0 commit comments

Comments
 (0)