예제 #1
0
  def __init__(self, matcher):
    """Initialize this visitor.

    Args:
      matcher: A class with a "Match" method, used for matching function
        argument types.
    """
    super(ExtractOperators, self).__init__()
    # class name -> op name -> list of signatures
    self.operators = collections.defaultdict(
        lambda: collections.defaultdict(list))
    self._slots = slots.ReverseSlotMapping()
    self.matcher = matcher
예제 #2
0
파일: slots_test.py 프로젝트: rezeik/pytype
 def testReverseSlotMapping(self):
     slots.ReverseSlotMapping().get("__radd__")  # smoke test