INNER CODE UNIT · Python
_dict_representer
tensorflow/docs · tools/tensorflow_docs/api_generator/gen_java/__init__.py:31
def _dict_representer(dumper, data):
"""Force yaml to output dictionaries in order, not alphabetically."""
return dumper.represent_dict(data.items())
Formatter.add_representer(dict, _dict_representer)
# __file__ is the path to this file
GEN_JAVA_DIR = pathlib.Path(__file__).resolve().parent
TEMPLATES = GEN_JAVA_DIR / 'templates'
DOCLAVA_FOR_TF = GEN_JAVA_DIR / 'run-javadoc-for-tf.sh'
def gen_java_docs(
package: Union[str, Iterable[str]],
source_path: pathlib.Path,
output_dir: pathlib.Path,