summaryrefslogtreecommitdiff
path: root/coverage/types.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2023-01-04 21:09:42 -0500
committerNed Batchelder <ned@nedbatchelder.com>2023-01-04 21:09:42 -0500
commit3a02703108831a554ec893b9031dcebe377fdd89 (patch)
treee2b579730daf750c05bfb2e0ee0596e0fa47079b /coverage/types.py
parent7b487470d0cccaf12d06cc363318c9b5eca6985f (diff)
downloadpython-coveragepy-git-3a02703108831a554ec893b9031dcebe377fdd89.tar.gz
mypy: test_debug.py test_execfile.py test_filereporter.py test_files.py
Diffstat (limited to 'coverage/types.py')
-rw-r--r--coverage/types.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/coverage/types.py b/coverage/types.py
index ed22e699..8ec4f37a 100644
--- a/coverage/types.py
+++ b/coverage/types.py
@@ -107,14 +107,16 @@ TCovKwargs = Any
## Configuration
# One value read from a config file.
-TConfigValue = Optional[Union[bool, int, float, str, List[str]]]
+TConfigValueIn = Optional[Union[bool, int, float, str, Iterable[str]]]
+TConfigValueOut = Optional[Union[bool, int, float, str, List[str]]]
# An entire config section, mapping option names to values.
-TConfigSection = Mapping[str, TConfigValue]
+TConfigSectionIn = Mapping[str, TConfigValueIn]
+TConfigSectionOut = Mapping[str, TConfigValueOut]
class TConfigurable(Protocol):
"""Something that can proxy to the coverage configuration settings."""
- def get_option(self, option_name: str) -> Optional[TConfigValue]:
+ def get_option(self, option_name: str) -> Optional[TConfigValueOut]:
"""Get an option from the configuration.
`option_name` is a colon-separated string indicating the section and
@@ -125,7 +127,7 @@ class TConfigurable(Protocol):
"""
- def set_option(self, option_name: str, value: Union[TConfigValue, TConfigSection]) -> None:
+ def set_option(self, option_name: str, value: Union[TConfigValueIn, TConfigSectionIn]) -> None:
"""Set an option in the configuration.
`option_name` is a colon-separated string indicating the section and