for method in _SUPPORTED_METHODS]
-_OPCODE_ATTRS = _BuildOpcodeAttributes()
+OPCODE_ATTRS = _BuildOpcodeAttributes()
def BuildUriList(ids, uri_format, uri_fields=("name", "uri")):
"""
return frozenset(filter(None, (getattr(cls, op_attr, None)
- for (_, op_attr, _, _) in _OPCODE_ATTRS)))
+ for (_, op_attr, _, _) in OPCODE_ATTRS)))
def GetHandlerAccess(handler, method):
# Access to private attributes of a client class, pylint: disable=W0212
obj = type.__call__(mcs, *args, **kwargs)
- for (method, op_attr, rename_attr, fn_attr) in _OPCODE_ATTRS:
+ for (method, op_attr, rename_attr, fn_attr) in OPCODE_ATTRS:
if hasattr(obj, method):
# If the method handler is already defined, "*_RENAME" or "Get*OpInput"
# shouldn't be (they're only used by the automatically generated
attrs = ["%s_OPCODE" % method, "%s_RENAME" % method,
"Get%sOpInput" % method.capitalize()]
assert attrs == dict((opattrs[0], list(opattrs[1:]))
- for opattrs in baserlib._OPCODE_ATTRS)[method]
+ for opattrs in baserlib.OPCODE_ATTRS)[method]
return attrs
def test(self):
for method in baserlib._SUPPORTED_METHODS:
# Empty handler
obj = self._MakeClass(method, {})(None, None, None)
- for attr in itertools.chain(*baserlib._OPCODE_ATTRS):
+ for attr in itertools.chain(*baserlib.OPCODE_ATTRS):
self.assertFalse(hasattr(obj, attr))
# Direct handler function
obj = _Empty(None, None, None)
- for attr in itertools.chain(*baserlib._OPCODE_ATTRS):
+ for attr in itertools.chain(*baserlib.OPCODE_ATTRS):
self.assertFalse(hasattr(obj, attr))