TYP: DataFrame.(dot, __matmul__)
- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

xref https://github.com/pandas-dev/pandas/pull/38416/files#r549438292
cc @simonjayhawkins This currently fails with mypy for reasons I haven't figured out:
```
pandas/core/frame.py:1162: error: Overloaded function signatures 1 and 2 overlap with incompatible return types  [misc]
pandas/core/frame.py:1280: error: Overloaded function signatures 1 and 2 overlap with incompatible return types  [misc]
```
but I believe what I have is the correct logic for these methods:
- if `other` is `Series` we return Series
- if `other` is a `DataFrame`, `np.ndarray`, `ExtensionArray` or `Index` we return a `DataFrame` 
- otherwise we throw > cc @simonjayhawkins This currently fails with mypy for reasons I haven't figured out:

from experience, `error: Overloaded function signatures 1 and 2 overlap with incompatible return types` occur since `np.ndarray` resolves to `Any`.  Thanks @arw2019 for the PR. when adding overloads also add the types to the actual method.

The overloads are used by mypy when establishing the return type when checking functions with calls to this method. The typing on the actual method is used to check this method. > > cc @simonjayhawkins This currently fails with mypy for reasons I haven't figured out:
> 
> from experience, `error: Overloaded function signatures 1 and 2 overlap with incompatible return types` occur since `np.ndarray` resolves to `Any`.

Right. Is it right there's no great way to fix that before `NumPy` 1.2? 

Currently I added a `type: ignore` which can be removed once we're checking against `NumPy` 1.2 (and I believe `mypy` will force that because the `type: ignore` will become unused). 

That said, I know `type: ignore` use is an anti-pattern, so alternatively I can just delete the overloads and create an issue in the tracker to be taken up once we've upgraded NumPy.

> Thanks @arw2019 for the PR. when adding overloads also add the types to the actual method.
> 
> The overloads are used by mypy when establishing the return type when checking functions with calls to this method. The typing on the actual method is used to check this method.

Thanks, that was the problem (in addition to the `ndarray` issue) thanks @arw2019 