Replace internal-only imports and comments that aren't valid externally.

PiperOrigin-RevId: 476492651
Change-Id: I310a21a73a65da3a5939f5cb8a1c8a67c8595863
This commit is contained in:
Saran Tunyasuvunakool
2022-09-23 16:58:09 -07:00
committed by Copybara-Service
parent 6acc111c48
commit b1a79aa01b
8 changed files with 22 additions and 28 deletions
+4 -4
View File
@@ -15,7 +15,7 @@
"""Generates enums.py.
The JSON input can be generated via:
clang -Xclang -ast-dump=json -fsyntax-only -fparse-all-comments mujoco.h
clang -Xclang -ast-dump=json -fsyntax-only -fparse-all-comments -x c mujoco.h
"""
import json
@@ -24,8 +24,8 @@ from typing import Any, Mapping, Sequence
from absl import app
from absl import flags
from google3.third_party.mujoco.introspect import ast_nodes
from google3.third_party.mujoco.introspect.codegen import formatter
from introspect import ast_nodes
from . import formatter
FLAGS = flags.FLAGS
flags.DEFINE_string(
@@ -116,7 +116,7 @@ DO NOT EDIT. THIS FILE IS AUTOMATICALLY GENERATED.
from typing import Mapping
from google3.third_party.mujoco.introspect.ast_nodes import EnumDecl
from .ast_nodes import EnumDecl
ENUMS: Mapping[str, EnumDecl] = {enums_str}
'''.strip()) # `print` adds a trailing newline
+9 -9
View File
@@ -15,7 +15,7 @@
"""Generates functions.py.
The JSON input can be generated via:
clang -Xclang -ast-dump=json -fsyntax-only -fparse-all-comments mujoco.h
clang -Xclang -ast-dump=json -fsyntax-only -fparse-all-comments -x c mujoco.h
"""
import json
@@ -24,9 +24,9 @@ from typing import Any, Mapping, Sequence
from absl import app
from absl import flags
from google3.third_party.mujoco.introspect import ast_nodes
from google3.third_party.mujoco.introspect import type_parsing
from google3.third_party.mujoco.introspect.codegen import formatter
from introspect import ast_nodes
from introspect import type_parsing
from . import formatter
FLAGS = flags.FLAGS
flags.DEFINE_string('header_path', None, 'Path to the original mujoco.h')
@@ -145,11 +145,11 @@ DO NOT EDIT. THIS FILE IS AUTOMATICALLY GENERATED.
from typing import Mapping
from google3.third_party.mujoco.introspect.ast_nodes import ArrayType
from google3.third_party.mujoco.introspect.ast_nodes import FunctionDecl
from google3.third_party.mujoco.introspect.ast_nodes import FunctionParameterDecl
from google3.third_party.mujoco.introspect.ast_nodes import PointerType
from google3.third_party.mujoco.introspect.ast_nodes import ValueType
from .ast_nodes import ArrayType
from .ast_nodes import FunctionDecl
from .ast_nodes import FunctionParameterDecl
from .ast_nodes import PointerType
from .ast_nodes import ValueType
FUNCTIONS: Mapping[str, FunctionDecl] = {functions_str}
'''.strip()) # `print` adds a trailing newline