diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-04 21:09:42 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-04 21:09:42 -0500 |
commit | 3a02703108831a554ec893b9031dcebe377fdd89 (patch) | |
tree | e2b579730daf750c05bfb2e0ee0596e0fa47079b /coverage/tomlconfig.py | |
parent | 7b487470d0cccaf12d06cc363318c9b5eca6985f (diff) | |
download | python-coveragepy-git-3a02703108831a554ec893b9031dcebe377fdd89.tar.gz |
mypy: test_debug.py test_execfile.py test_filereporter.py test_files.py
Diffstat (limited to 'coverage/tomlconfig.py')
-rw-r--r-- | coverage/tomlconfig.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coverage/tomlconfig.py b/coverage/tomlconfig.py index 737c728c..3b8ff347 100644 --- a/coverage/tomlconfig.py +++ b/coverage/tomlconfig.py @@ -11,7 +11,7 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, T from coverage import env from coverage.exceptions import ConfigError from coverage.misc import import_third_party, substitute_variables -from coverage.types import TConfigSection, TConfigValue +from coverage.types import TConfigSectionOut, TConfigValueOut if env.PYVERSION >= (3, 11, 0, "alpha", 7): @@ -65,7 +65,7 @@ class TomlConfigParser: raise ConfigError(msg.format(filename)) return [] - def _get_section(self, section: str) -> Tuple[Optional[str], Optional[TConfigSection]]: + def _get_section(self, section: str) -> Tuple[Optional[str], Optional[TConfigSectionOut]]: """Get a section from the data. Arguments: @@ -92,7 +92,7 @@ class TomlConfigParser: return None, None return real_section, data - def _get(self, section: str, option: str) -> Tuple[str, TConfigValue]: + def _get(self, section: str, option: str) -> Tuple[str, TConfigValueOut]: """Like .get, but returns the real section name and the value.""" name, data = self._get_section(section) if data is None: @@ -135,7 +135,7 @@ class TomlConfigParser: raise ConfigError(f"No section: {section!r}") return list(data.keys()) - def get_section(self, section: str) -> TConfigSection: + def get_section(self, section: str) -> TConfigSectionOut: _, data = self._get_section(section) return data or {} |