summaryrefslogtreecommitdiff
path: root/src/tox/config
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2021-11-16 09:53:37 +0000
committerBernát Gábor <gaborjbernat@gmail.com>2021-11-16 10:41:13 +0000
commitadccfb6b1e021458e02956dc84197dcdd05d6eed (patch)
treec9bfe5e16537d4018a9a7ce3a4c111b5f5e5364c /src/tox/config
parentad97564a1eafef6cd72aab91aaafbe918e59f49e (diff)
downloadtox-git-adccfb6b1e021458e02956dc84197dcdd05d6eed.tar.gz
Update setup changelog
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
Diffstat (limited to 'src/tox/config')
-rw-r--r--src/tox/config/cli/parser.py17
-rw-r--r--src/tox/config/loader/ini/__init__.py6
-rw-r--r--src/tox/config/main.py5
-rw-r--r--src/tox/config/source/api.py6
4 files changed, 28 insertions, 6 deletions
diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py
index 9193f47c..e25be60b 100644
--- a/src/tox/config/cli/parser.py
+++ b/src/tox/config/cli/parser.py
@@ -139,7 +139,11 @@ class ToxParser(ArgumentParserWithEnvAndConfig):
if self._cmd is None:
raise RuntimeError("no sub-command group allowed")
sub_parser: ToxParser = self._cmd.add_parser(
- cmd, help=help_msg, aliases=aliases, formatter_class=HelpFormatter, file_config=self.file_config
+ cmd,
+ help=help_msg,
+ aliases=aliases,
+ formatter_class=HelpFormatter,
+ file_config=self.file_config,
)
sub_parser.of_cmd = cmd # mark it as parser for a sub-command
content = sub_parser, handler
@@ -211,7 +215,9 @@ class ToxParser(ArgumentParserWithEnvAndConfig):
self.fix_defaults()
def parse_known_args( # type: ignore[override]
- self, args: Optional[Sequence[str]], namespace: Optional[Parsed] = None
+ self,
+ args: Optional[Sequence[str]],
+ namespace: Optional[Parsed] = None,
) -> Tuple[Parsed, List[str]]:
if args is None:
args = sys.argv[1:]
@@ -244,7 +250,12 @@ def add_verbosity_flags(parser: ArgumentParser) -> None:
)
verbosity = verbosity_group.add_mutually_exclusive_group()
verbosity.add_argument(
- "-v", "--verbose", action="count", dest="verbose", help="increase verbosity", default=DEFAULT_VERBOSITY
+ "-v",
+ "--verbose",
+ action="count",
+ dest="verbose",
+ help="increase verbosity",
+ default=DEFAULT_VERBOSITY,
)
verbosity.add_argument("-q", "--quiet", action="count", dest="quiet", help="decrease verbosity", default=0)
diff --git a/src/tox/config/loader/ini/__init__.py b/src/tox/config/loader/ini/__init__.py
index c991a8be..76efe8b7 100644
--- a/src/tox/config/loader/ini/__init__.py
+++ b/src/tox/config/loader/ini/__init__.py
@@ -24,7 +24,11 @@ class IniLoader(StrConvert, Loader[str]):
"""Load configuration from an ini section (ini file is a string to string dictionary)"""
def __init__(
- self, section: Section, parser: ConfigParser, overrides: List[Override], core_section: Section
+ self,
+ section: Section,
+ parser: ConfigParser,
+ overrides: List[Override],
+ core_section: Section,
) -> None:
self._section_proxy: SectionProxy = parser[section.key]
self._parser = parser
diff --git a/src/tox/config/main.py b/src/tox/config/main.py
index 4c53e720..a4bd06c7 100644
--- a/src/tox/config/main.py
+++ b/src/tox/config/main.py
@@ -143,7 +143,10 @@ class Config:
return conf_set
def get_env(
- self, item: str, package: bool = False, loaders: Optional[Sequence[Loader[Any]]] = None
+ self,
+ item: str,
+ package: bool = False,
+ loaders: Optional[Sequence[Loader[Any]]] = None,
) -> EnvConfigSet:
"""
Return the configuration for a given tox environment (will create if not exist yet).
diff --git a/src/tox/config/source/api.py b/src/tox/config/source/api.py
index 99e3aaa0..0cbc4feb 100644
--- a/src/tox/config/source/api.py
+++ b/src/tox/config/source/api.py
@@ -21,7 +21,11 @@ class Source(ABC):
self._section_to_loaders: Dict[str, List[Loader[Any]]] = {}
def get_loaders(
- self, section: Section, base: Optional[List[str]], override_map: OverrideMap, conf: ConfigSet
+ self,
+ section: Section,
+ base: Optional[List[str]],
+ override_map: OverrideMap,
+ conf: ConfigSet,
) -> Iterator[Loader[Any]]:
"""
Return a loader that loads settings from a given section name.