# Buggy code
def operator_method_signatures_overlap(
    self,
    reverse_class: str,
    reverse_method: str,
    forward_class: str,
    forward_method: str,
    context: Context,
) -> None:
    self.fail(
        'Signatures of "{}" of "{}" and "{}" of "{}" are unsafely overlapping'.format(
            reverse_method, reverse_class, forward_method, forward_class
        ),
        context,
    )


# Traceback (AttributeError)
third_party/3/pyspark/sql/column.pyi:24: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.511
Traceback (most recent call last):
File "/home/user/anaconda3/bin/mypy", line 6, in <module>
main(__file__)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/main.py", line 46, in main
res = type_check_only(sources, bin_dir, options)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/main.py", line 93, in type_check_only
options=options)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/build.py", line 188, in build
graph = dispatch(sources, manager)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/build.py", line 1595, in dispatch
process_graph(graph, manager)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/build.py", line 1838, in process_graph
process_stale_scc(graph, scc, manager)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/build.py", line 1937, in process_stale_scc
graph[id].type_check_first_pass()
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/build.py", line 1510, in type_check_first_pass
self.type_checker.check_first_pass()
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 177, in check_first_pass
self.accept(d)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 264, in accept
stmt.accept(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/nodes.py", line 750, in accept
return visitor.visit_class_def(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 1080, in visit_class_def
self.accept(defn.defs)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 264, in accept
stmt.accept(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/nodes.py", line 811, in accept
return visitor.visit_block(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 1173, in visit_block
self.accept(s)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 264, in accept
stmt.accept(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/nodes.py", line 565, in accept
return visitor.visit_func_def(self)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 510, in visit_func_def
self.check_func_item(defn, name=defn.name())
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 569, in check_func_item
self.check_func_def(defn, typ, name)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 616, in check_func_def
self.check_reverse_op_method(item, typ, name)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 806, in check_reverse_op_method
defn)
File "/home/user/anaconda3/lib/python3.5/site-packages/mypy/checker.py", line 876, in check_overlapping_op_methods
forward_base.type.name(), forward_name, context)
AttributeError: 'UnionType' object has no attribute 'type'
third_party/3/pyspark/sql/column.pyi:24: note: use --pdb to drop into pdb

# Fixed code
def operator_method_signatures_overlap(
    self,
    reverse_class: TypeInfo,
    reverse_method: str,
    forward_class: Type,
    forward_method: str,
    context: Context,
) -> None:
    self.fail(
        'Signatures of "{}" of "{}" and "{}" of {} are unsafely overlapping'.format(
            reverse_method,
            reverse_class.name(),
            forward_method,
            self.format(forward_class),
        ),
        context,
    )