TYP: annotations in core.groupby
I'm still seeing a couple of mypy complaints, suggestions @simonjayhawkins ?
> I'm still seeing a couple of mypy complaints, suggestions @simonjayhawkins ?

pandas\core\groupby\categorical.py:101: error: "CategoricalIndex" has no attribute "set_categories"; maybe "categories"?  [attr-defined]
pandas\core\groupby\categorical.py:104: error: "CategoricalIndex" has no attribute "add_categories"; maybe "categories"?  [attr-defined]

These are because mypy is a static type checker and these methods are dynamically added to CategoricalIndex

in `DatetimeIndex`, tz_localize and to_period were added statically https://github.com/pandas-dev/pandas/pull/34630#discussion_r436402735

I'm OK with # type: ignores on this pass (with error code) 
 error: Argument 1 to "map" has incompatible type overloaded function; expected "Callable[[object], Iterator[_T]]"  [arg-type]

not sure on this one.

mypy is happy with
```
        for name, lev, in_axis in zip(
            reversed(self.grouper.names),
            reversed(self.grouper.get_group_levels()),
            reversed([grp.in_axis for grp in self.grouper.groupings]),
        ):
```
which I think is easier to grok anyhow. > error: Argument 1 to "map" has incompatible type overloaded function; expected "Callable[[object], Iterator[_T]]" [arg-type]
> 
> not sure on this one.

see https://github.com/python/mypy/issues/6811#issuecomment-491332516

>As for the originally reported bug, it also repros with this simpler code:

>```
>def get_common_index(*names: str) -> int:
>    x = map(reversed, names)
>    return 0
>```

 Thanks @jbrockmendel 