TYP: Groupby sum|prod|min|max|first|last methods
This makes two things:
* makes mypy know the signatures of the agg methods (``sum``, ``prod``, etc.) on Groupby
* gives the agg methods on Groupby objects a return type

This ensues that mypy and  IDE's always know that the return type of e.g. ``df.groupby('a').sum()`` is a DataFrame, which is nice when chaining.
there's got to be a less verbose way of doing this, isnt there? > why are you not generating these like we do in genetic for the stat functions ?

Doing e.g. ``reveal_type(df.var)``on master gives a revealed type of ``Any``. I don't think it's possible to programatically add methods and also have mypy infer their types, parameters or return values. Mypy isn't advance enough to do that.

It's true that this is a bit repetitive, but always with slight variations. Getting correct parameter and return types is something I value highly in a library as complex as Pandas, so IMO this is worth it.
 > I don't think it's possible to programatically add methods and also have mypy infer their types, parameters or return values. Mypy isn't advance enough to do that.

cc @simonjayhawkins is this likely to improve at any point?  would something like stub files help?

I find this pattern annoying at debug-time, when it is an extra layer of calls to look through (since I have to double-check whether the super().foo(...) call is changing any kwargs).

(core.window.expanding is another place where we do something like this, but in that case for docstrings) FWIW I don't find stepping through the functions as is necessarily any clearer than inheriting as done here. This is more verbose, but I don't think factory-generating these really adds all that much value and I do think would be nice to support annotations on these > there's got to be a less verbose way of doing this, isnt there?

@topper-123 commit making _Groupby a generic class. https://github.com/pandas-dev/pandas/commit/dccbd00a75f5f39c2979e1970635ce00d26c3a11 @topper-123 still active? I think this is a nice change and helpful when we think about bumping our mypy pin, so would love if there's an easy way to address comments I've been a bit busy lately. I can see if I can make something work over the coming days. can you merge master ping on green. I've updated the PR and removed the return types, so this is only refactoring ``_add_numeric_operations`` and make mypy discover the methods.

So, this does:

```python
>>> meth = df.groupby('x').sum
>>> reveal_type(meth)
Any  # master
Revealed type is 'def (numeric_only: builtins.bool =, min_count: builtins.int =) -> Any'  # this PR
```

The Travis failure looks unrelated. I've made a new commit that simplifies the PR wrt. the static method. Superceded by #34200.