diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-03 13:53:45 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-03 13:53:45 -0500 |
commit | 98301ed240a141592573c2ed239e006d42a26161 (patch) | |
tree | f774b5fa50df5b994c963a8be589aa8fc8754e18 /coverage | |
parent | 9d2e1b055cf7ed02eba725b86d476c24a718178d (diff) | |
download | python-coveragepy-git-98301ed240a141592573c2ed239e006d42a26161.tar.gz |
mypy: test_config.py, test_context.py
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/config.py | 2 | ||||
-rw-r--r-- | coverage/types.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/coverage/config.py b/coverage/config.py index 69159d99..02d54716 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -73,7 +73,7 @@ class HandyConfigParser(configparser.ConfigParser): def get_section(self, section: str) -> TConfigSection: """Get the contents of a section, as a dictionary.""" - d: TConfigSection = {} + d: Dict[str, TConfigValue] = {} for opt in self.options(section): d[opt] = self.get(section, opt) return d diff --git a/coverage/types.py b/coverage/types.py index ddfcdb81..54c1dfba 100644 --- a/coverage/types.py +++ b/coverage/types.py @@ -109,7 +109,7 @@ TCovKwargs = Any # One value read from a config file. TConfigValue = Optional[Union[bool, int, float, str, List[str]]] # An entire config section, mapping option names to values. -TConfigSection = Dict[str, TConfigValue] +TConfigSection = Mapping[str, TConfigValue] class TConfigurable(Protocol): """Something that can proxy to the coverage configuration settings.""" |