fix type annotation for pandas._config.config.py
State: closed

also remove this module from mypy.ini

- [x] closes #25899 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=h1) Report
> Merging [#25918](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7721f7009249e2b1fa2647526114e7c423fef4ea?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/25918/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #25918      +/-   ##
==========================================
- Coverage   91.77%   91.77%   -0.01%     
==========================================
  Files         175      175              
  Lines       52606    52607       +1     
==========================================
- Hits        48280    48278       -2     
- Misses       4326     4329       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <100%> (ø)` | :arrow_up: |
| #single | `41.9% <100%> (-0.08%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/\_config/config.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL19jb25maWcvY29uZmlnLnB5) | `86.86% <100%> (+0.04%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `75% <0%> (-12.5%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.79% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.56% <0%> (+0.1%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25918?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/25918?src=pr&el=footer). Last update [7721f70...d0a0c4c](https://codecov.io/gh/pandas-dev/pandas/pull/25918?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/25918?src=pr&el=h1) Report
> Merging [#25918](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7721f7009249e2b1fa2647526114e7c423fef4ea?src=pr&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #25918      +/-   ##
==========================================
+ Coverage   91.77%   91.81%   +0.03%     
==========================================
  Files         175      175              
  Lines       52606    52581      -25     
==========================================
- Hits        48280    48276       -4     
+ Misses       4326     4305      -21
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.36% <100%> (+0.04%)` | :arrow_up: |
| #single | `41.89% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/\_config/config.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL19jb25maWcvY29uZmlnLnB5) | `86.86% <100%> (+0.04%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `75% <0%> (-12.5%)` | :arrow_down: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `96.96% <0%> (-2.24%)` | :arrow_down: |
| [pandas/core/computation/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vY29tbW9uLnB5) | `89.47% <0%> (-0.53%)` | :arrow_down: |
| [pandas/compat/pickle\_compat.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9waWNrbGVfY29tcGF0LnB5) | `69.13% <0%> (-0.38%)` | :arrow_down: |
| [pandas/core/groupby/grouper.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGVyLnB5) | `98.16% <0%> (-0.37%)` | :arrow_down: |
| [pandas/compat/numpy/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9udW1weS9fX2luaXRfXy5weQ==) | `92.85% <0%> (-0.25%)` | :arrow_down: |
| [pandas/plotting/\_style.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19zdHlsZS5weQ==) | `77.17% <0%> (-0.25%)` | :arrow_down: |
| [pandas/core/computation/engines.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vZW5naW5lcy5weQ==) | `88.52% <0%> (-0.19%)` | :arrow_down: |
| [pandas/plotting/\_timeseries.py](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL190aW1lc2VyaWVzLnB5) | `65.28% <0%> (-0.18%)` | :arrow_down: |
| ... and [55 more](https://codecov.io/gh/pandas-dev/pandas/pull/25918/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25918?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/25918?src=pr&el=footer). Last update [7721f70...cc72f5b](https://codecov.io/gh/pandas-dev/pandas/pull/25918?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@WillAyd I am little confused about what type to use for namedtuple in `_deprecated_options` and `_registered_options`, please let me know if what I have done looks right.

thanks @vaibhavhrt 
@jreback My pleasure, looking forward to contribute more.
@vadakattu thanks! We would ideally be able to eliminate all items from being blacklisted in mypy.ini save maybe test folders for now, so if you see other modules you want to attack feel free to open an issue / PR for it
@WillAyd looks like you mentioned someone else by mistake. But yes I would be happy to help. I think you have listed about 60+ modules in some issue. I will start working on them one by one. Is it okay if I create the issue for each one them too myself, or will you do that?
I am thinking if one single person can assign modules that would be good, because there can be multiple people working on 'typing' and there can be situations when two people accidentally start working on same file. You don't have to create an issue, you can just leave a comment in the master issue that which module I should work on next, I can then take care of creating an issue and PR.
> Is it okay if I create the issue for each one them too myself, or will you do that?

Go ahead and create an issue when you have one in mind
ok, I will do that.