Misc Type Annotation fixes
State: closed

Part of #25882 
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Cleanup of type annotations in files that only had a handful of straightforward errors (or no longer threw errors). These include:

# pandas.core.util.hasing
`pandas/core/util/hashing.py:8: error: Module 'pandas._libs' has no attribute 'hashing'`

# pandas.core.indexing
```
pandas/core/indexing.py:1487: error: Incompatible types in assignment (expression has type "Type[Exception]", base class "_NDFrameIndexer" defined the type as "Type[KeyError]")
pandas/core/indexing.py:1783: error: Incompatible types in assignment (expression has type "str", base class "_NDFrameIndexer" defined the type as "None")
pandas/core/indexing.py:2056: error: Incompatible types in assignment (expression has type "str", base class "_NDFrameIndexer" defined the type as "None")
pandas/core/indexing.py:2058: error: Incompatible types in assignment (expression has type "Type[IndexError]", base class "_NDFrameIndexer" defined the type as "Type[KeyError]")
```

# pandas.core.internals.blocks
`pandas/core/internals/blocks.py:2200: error: Definition of "_can_hold_na" in base class "ExtensionBlock" is incompatible with definition in base class "DatetimeBlock"`

# pandas.core.series
`pandas/core/series.py:98: error: Definition of "_update_inplace" in base class "IndexOpsMixin" is incompatible with definition in base class "NDFrame"`

# pandas.core.panel
`pandas/core/panel.py:867: error: Incompatible types in assignment (expression has type "Callable[[Any, Any], Any]", base class "NDFrame" defined the type as "Callable[[Any, Any, Any, Any], Any]")`

# pandas.core.reshape.reshape
`pandas/core/reshape/reshape.py:6: error: Module 'pandas._libs' has no attribute 'reshape'`

# pandas.io.pytables
```
pandas/io/pytables.py:2462: error: Need type annotation for 'attributes'
pandas/io/pytables.py:2845: error: Incompatible types in assignment (expression has type "str", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:2882: error: Incompatible types in assignment (expression has type "str", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:2906: error: Incompatible types in assignment (expression has type "str", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:3025: error: Incompatible types in assignment (expression has type "str", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:3026: error: Incompatible types in assignment (expression has type "Type[DataFrame]", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:3054: error: Incompatible types in assignment (expression has type "str", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:3849: error: Incompatible types in assignment (expression has type "str", base class "Table" defined the type as "None")
pandas/io/pytables.py:3877: error: Incompatible types in assignment (expression has type "str", base class "Table" defined the type as "None")
pandas/io/pytables.py:3878: error: Incompatible types in assignment (expression has type "int", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:3894: error: Incompatible types in assignment (expression has type "None", base class "LegacyTable" defined the type as "List[IndexCol]")
pandas/io/pytables.py:4129: error: Incompatible types in assignment (expression has type "Type[DataFrame]", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:4195: error: Incompatible types in assignment (expression has type "Type[Series]", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:4253: error: Incompatible types in assignment (expression has type "Type[DataFrame]", base class "Fixed" defined the type as "None")
pandas/io/pytables.py:4301: error: Incompatible types in assignment (expression has type "Type[DataFrame]", base class "Fixed" defined the type as "None")
```

# pandas.core.reshape.merge
`pandas/core/reshape/merge.py:11: error: Module 'pandas._libs' has no attribute 'join'`

# pandas.util.testing
`pandas/util/testing.py:24: error: Module 'pandas._libs' has no attribute 'testing'`

# pandas.core.window
```
pandas/core/window.py:45: error: Need type annotation for 'exclusions'
pandas/core/window.py:314: error: Incompatible types in assignment (expression has type "Callable[[Arg(Any, 'arg'), VarArg(Any), KwArg(Any)], Any]", base class "SelectionMixin" defined the type as "Callable[[Arg(Any, 'func'), VarArg(Any), KwArg(Any)], Any]")
pandas/core/window.py:1806: error: Definition of "_apply" in base class "_GroupByMixin" is incompatible with definition in base class "_Rolling"
pandas/core/window.py:2077: error: Definition of "_apply" in base class "_GroupByMixin" is incompatible with definition in base class "_Rolling"
```

# pandas.core.resample
```
pandas/core/resample.py:34: error: Need type annotation for '_shared_docs_kwargs'
pandas/core/resample.py:876: error: All conditional function variants must have identical signatures
pandas/core/resample.py:884: error: All conditional function variants must have identical signatures
pandas/core/resample.py:891: error: All conditional function variants must have identical signatures
pandas/core/resample.py:1101: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1101: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1101: error: Definition of "_downsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1101: error: Definition of "_groupby_and_aggregate" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1217: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "PeriodIndexResampler"
pandas/core/resample.py:1217: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1217: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1217: error: Definition of "_downsample" in base class "_GroupByMixin" is incompatible with definition in base class "PeriodIndexResampler"
pandas/core/resample.py:1217: error: Definition of "_downsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1217: error: Definition of "_groupby_and_aggregate" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1247: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1247: error: Definition of "_upsample" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1247: error: Definition of "_downsample" in base class "_GroupByMixin" is incompatible with definition in base class "DatetimeIndexResampler"
pandas/core/resample.py:1247: error: Definition of "_groupby_and_aggregate" in base class "_GroupByMixin" is incompatible with definition in base class "Resampler"
pandas/core/resample.py:1299: error: Incompatible types in assignment (expression has type "Tuple[str, ...]", base class "Grouper" defined the type as "Tuple[str, str, str, str, str]")
```

**pandas.util._doctools** was removed because it no longer threw mypy errors for some reason.

Labels:
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=h1) Report
> Merging [#26372](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b48d1ff87237cb68792590f4377e3be5c73d5ea7?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26372/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26372      +/-   ##
==========================================
- Coverage   91.68%   91.68%   -0.01%     
==========================================
  Files         174      174              
  Lines       50700    50710      +10     
==========================================
+ Hits        46486    46492       +6     
- Misses       4214     4218       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.18% <100%> (ø)` | :arrow_up: |
| #single | `41.18% <93.54%> (-0.17%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.08% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `90.54% <100%> (ø)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `98% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.7% <100%> (ø)` | :arrow_up: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `93.34% <100%> (ø)` | :arrow_up: |
| [pandas/core/reshape/merge.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZXJnZS5weQ==) | `94.47% <100%> (ø)` | :arrow_up: |
| [pandas/core/util/hashing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdXRpbC9oYXNoaW5nLnB5) | `98.41% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.56% <100%> (ø)` | :arrow_up: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `90.22% <100%> (ø)` | :arrow_up: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.42% <100%> (ø)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=footer). Last update [b48d1ff...86f61b6](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=h1) Report
> Merging [#26372](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/cb6e47d5a04c89cb6f3564753c43abadbdf81c94?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26372/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26372      +/-   ##
==========================================
- Coverage   91.69%   91.69%   -0.01%     
==========================================
  Files         174      174              
  Lines       50741    50748       +7     
==========================================
+ Hits        46529    46532       +3     
- Misses       4212     4216       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.2% <100%> (ø)` | :arrow_up: |
| #single | `41.16% <93.1%> (-0.17%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.08% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `90.53% <100%> (ø)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `98% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.7% <100%> (ø)` | :arrow_up: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `93.49% <100%> (ø)` | :arrow_up: |
| [pandas/core/reshape/merge.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZXJnZS5weQ==) | `94.47% <100%> (ø)` | :arrow_up: |
| [pandas/core/util/hashing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdXRpbC9oYXNoaW5nLnB5) | `98.41% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.56% <100%> (ø)` | :arrow_up: |
| [pandas/io/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3B5dGFibGVzLnB5) | `90.22% <100%> (ø)` | :arrow_up: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.41% <100%> (ø)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/pandas-dev/pandas/pull/26372/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=footer). Last update [cb6e47d...9e42d72](https://codecov.io/gh/pandas-dev/pandas/pull/26372?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@WillAyd Do you have any insight into what's causing the Linux py37_np_dev tests to fail? It doesn't seem related to this PR to me.
Just merged a fix into master for that should go away on next push
lgtm, can you merge master; ping on green.
@jreback the board is green.
Thanks @gwrome
closes #26439