MCPcopy Index your code
hub / github.com/google-deepmind/dm_control / __new__

Method __new__

dm_control/mujoco/engine.py:107–114  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

105 _contexts = None
106
107 def __new__(cls, *args, **kwargs):
108 # TODO(b/174603485): Re-enable once lint stops spuriously firing here.
109 obj = super(Physics, cls).__new__(cls) # pylint: disable=no-value-for-parameter
110 # The lock is created in `__new__` rather than `__init__` because there are
111 # a number of existing subclasses that override `__init__` without calling
112 # the `__init__` method of the superclass.
113 obj._contexts_lock = threading.Lock() # pylint: disable=protected-access
114 return obj
115
116 def __init__(self, data):
117 """Initializes a new `Physics` instance.

Callers 1

copyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected