Replace internal-only imports and comments that aren't valid externally.
PiperOrigin-RevId: 476492651 Change-Id: I310a21a73a65da3a5939f5cb8a1c8a67c8595863
This commit is contained in:
committed by
Copybara-Service
parent
6acc111c48
commit
b1a79aa01b
@@ -16,7 +16,7 @@
|
||||
|
||||
from absl.testing import absltest
|
||||
|
||||
from google3.third_party.mujoco.introspect import ast_nodes
|
||||
from . import ast_nodes
|
||||
|
||||
|
||||
class AstNodesTest(absltest.TestCase):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
from absl.testing import absltest
|
||||
|
||||
from google3.third_party.mujoco.introspect import enums
|
||||
from . import enums
|
||||
|
||||
|
||||
class EnumsTest(absltest.TestCase):
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
from absl.testing import absltest
|
||||
|
||||
from google3.third_party.mujoco.introspect import ast_nodes
|
||||
from google3.third_party.mujoco.introspect import functions
|
||||
from google3.third_party.mujoco.introspect import type_parsing
|
||||
from . import ast_nodes
|
||||
from . import functions
|
||||
from . import type_parsing
|
||||
|
||||
|
||||
class FunctionsTest(absltest.TestCase):
|
||||
|
||||
@@ -18,7 +18,7 @@ import collections
|
||||
import re
|
||||
from typing import Mapping, MutableSequence, Optional, Sequence, Tuple, Union
|
||||
|
||||
from google3.third_party.mujoco.introspect import ast_nodes
|
||||
from . import ast_nodes
|
||||
|
||||
ARRAY_EXTENTS_PATTERN = re.compile(r'(\[[^\]]+\]\s*)+\Z')
|
||||
ARRAY_N_PATTERN = re.compile(r'\[([^\]]+)\]')
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
from absl.testing import absltest
|
||||
|
||||
from google3.third_party.mujoco.introspect import ast_nodes
|
||||
from google3.third_party.mujoco.introspect import type_parsing
|
||||
from . import ast_nodes
|
||||
from . import type_parsing
|
||||
|
||||
|
||||
class TypeParsingTest(absltest.TestCase):
|
||||
|
||||
@@ -13,13 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""A script for running step_benchmark_test for a variety of build settings.
|
||||
|
||||
This is not meant to be run in google3, but in the git repository's root.
|
||||
|
||||
This will be used for release 2.1.1, and adapted for future use when more
|
||||
decisions about the build need to be made.
|
||||
"""
|
||||
"""A script for running step_benchmark_test for a variety of build settings."""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user