diff options
author | Mark Daoust <markdaoust@google.com> | 2017-04-19 06:15:23 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-19 07:29:05 -0700 |
commit | 95c5d7e880b8b4d18ba1f3b7cf40d15cd218b3c9 (patch) | |
tree | 9ad003a886fe9444fccd2f3183f33a5b345db106 /tensorflow/tools/common | |
parent | 8b6c3c8e8817b64e83ba3a7379935d0ea9232605 (diff) |
Generalize LazyLoader for use by ffmpeg
Add __dir__ method so the docs generator doesn't need to
do anything special to activate the loading
Change: 153583515
Diffstat (limited to 'tensorflow/tools/common')
-rw-r--r-- | tensorflow/tools/common/public_api.py | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/tensorflow/tools/common/public_api.py b/tensorflow/tools/common/public_api.py index 173b39c538..44c6f24e56 100644 --- a/tensorflow/tools/common/public_api.py +++ b/tensorflow/tools/common/public_api.py @@ -36,29 +36,35 @@ class PublicAPIVisitor(object): """ self._visitor = visitor - # Modules/classes we do not want to descend into if we hit them. Usually, - # sytem modules exposed through platforms for compatibility reasons. - # Each entry maps a module path to a name to ignore in traversal. - _do_not_descend_map = { - '': [ - 'core', - 'examples', - 'flags', # Don't add flags - 'platform', # TODO(drpng): This can be removed once sealed off. - 'pywrap_tensorflow', # TODO(drpng): This can be removed once sealed. - 'user_ops', # TODO(drpng): This can be removed once sealed. - 'python', - 'tools', - 'tensorboard', - ], - - # Some implementations have this internal module that we shouldn't expose. - 'flags': ['cpp_flags'], - - # Everything below here is legitimate. - 'app': ['flags'], # It'll stay, but it's not officially part of the API. - 'test': ['mock'], # Imported for compatibility between py2/3. - } + # Modules/classes we do not want to descend into if we hit them. Usually, + # sytem modules exposed through platforms for compatibility reasons. + # Each entry maps a module path to a name to ignore in traversal. + self._do_not_descend_map = { + '': [ + 'core', + 'examples', + 'flags', # Don't add flags + # TODO(drpng): This can be removed once sealed off. + 'platform', + # TODO(drpng): This can be removed once sealed. + 'pywrap_tensorflow', + # TODO(drpng): This can be removed once sealed. + 'user_ops', + 'python', + 'tools', + 'tensorboard', + ], + + # Some implementations have this internal module that we shouldn't + # expose. + 'flags': ['cpp_flags'], + + ## Everything below here is legitimate. + # It'll stay, but it's not officially part of the API. + 'app': ['flags'], + # Imported for compatibility between py2/3. + 'test': ['mock'], + } @property def do_not_descend_map(self): |