Skip to content

Commit 98301ed

Browse files
committed
mypy: test_config.py, test_context.py
1 parent 9d2e1b0 commit 98301ed

File tree

5 files changed

+101
-97
lines changed

5 files changed

+101
-97
lines changed

coverage/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def options(self, section: str) -> List[str]:
7373

7474
def get_section(self, section: str) -> TConfigSection:
7575
"""Get the contents of a section, as a dictionary."""
76-
d: TConfigSection = {}
76+
d: Dict[str, TConfigValue] = {}
7777
for opt in self.options(section):
7878
d[opt] = self.get(section, opt)
7979
return d

coverage/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_stats(self) -> Optional[Dict[str, int]]:
109109
# One value read from a config file.
110110
TConfigValue = Optional[Union[bool, int, float, str, List[str]]]
111111
# An entire config section, mapping option names to values.
112-
TConfigSection = Dict[str, TConfigValue]
112+
TConfigSection = Mapping[str, TConfigValue]
113113

114114
class TConfigurable(Protocol):
115115
"""Something that can proxy to the coverage configuration settings."""

0 commit comments

Comments
 (0)