Skip to content

Commit

Permalink
mypy: test_config.py, test_context.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jan 3, 2023
1 parent 9d2e1b0 commit 98301ed
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 97 deletions.
2 changes: 1 addition & 1 deletion coverage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def options(self, section: str) -> List[str]:

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
Expand Down
2 changes: 1 addition & 1 deletion coverage/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_stats(self) -> Optional[Dict[str, int]]:
# 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."""
Expand Down
Loading

0 comments on commit 98301ed

Please sign in to comment.