Skip to content

Commit c7c4c94

Browse files
vaibhavhrtjreback
authored andcommitted
fix type annotation for pandas._config.config.py (#25918)
1 parent 3989e47 commit c7c4c94

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

mypy.ini

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ follow_imports=silent
55
[mypy-pandas.conftest,pandas.tests.*]
66
ignore_errors=True
77

8-
[mypy-pandas._config.config]
9-
ignore_errors=True
10-
118
[mypy-pandas._version]
129
ignore_errors=True
1310

pandas/_config/config.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,24 @@
5151
from collections import namedtuple
5252
from contextlib import contextmanager
5353
import re
54+
from typing import Dict, List
5455
import warnings
5556

5657
DeprecatedOption = namedtuple('DeprecatedOption', 'key msg rkey removal_ver')
5758
RegisteredOption = namedtuple('RegisteredOption',
5859
'key defval doc validator cb')
5960

60-
_deprecated_options = {} # holds deprecated option metdata
61-
_registered_options = {} # holds registered option metdata
62-
_global_config = {} # holds the current values for registered options
63-
_reserved_keys = ['all'] # keys which have a special meaning
61+
# holds deprecated option metdata
62+
_deprecated_options = {} # type: Dict[str, DeprecatedOption]
63+
64+
# holds registered option metdata
65+
_registered_options = {} # type: Dict[str, RegisteredOption]
66+
67+
# holds the current values for registered options
68+
_global_config = {} # type: Dict[str, str]
69+
70+
# keys which have a special meaning
71+
_reserved_keys = ['all'] # type: List[str]
6472

6573

6674
class OptionError(AttributeError, KeyError):

0 commit comments

Comments
 (0)