From 3a02703108831a554ec893b9031dcebe377fdd89 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 4 Jan 2023 21:09:42 -0500 Subject: mypy: test_debug.py test_execfile.py test_filereporter.py test_files.py --- coverage/tomlconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coverage/tomlconfig.py') 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 {} -- cgit v1.2.1