Skip to content

Commit 3c4a8df

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8f086c8 commit 3c4a8df

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/tox/config/loader/ini/factor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def name_with_negate(factor: str) -> tuple[str, bool]:
9292
def is_negated(factor: str) -> bool:
9393
return factor.startswith("!")
9494

95+
9596
def expand_ranges(value: str) -> str:
9697
"""Expand ranges in env expressions, eg py3{10-13} -> "py3{10,11,12,13}"""
9798
matches = re.findall(r"((\d+)-(\d+)|\d+)(?:,|})", value)
@@ -104,10 +105,11 @@ def expand_ranges(value: str) -> str:
104105
value = value.replace(src, expansion, 1)
105106
return value
106107

108+
107109
__all__ = (
108110
"expand_factors",
111+
"expand_ranges",
109112
"extend_factors",
110113
"filter_for_env",
111114
"find_envs",
112-
"expand_ranges",
113115
)

src/tox/config/loader/replacer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import logging
66
import os
7-
import re
87
import sys
98
from abc import ABC, abstractmethod
109
from typing import TYPE_CHECKING, Any, Final, Sequence, Union
@@ -287,6 +286,7 @@ def replace_env(conf: Config | None, args: list[str], conf_args: ConfigLoadArgs)
287286
def replace_tty(args: list[str]) -> str:
288287
return (args[0] if len(args) > 0 else "") if sys.stdout.isatty() else args[1] if len(args) > 1 else ""
289288

289+
290290
__all__ = [
291291
"MatchExpression",
292292
"MatchRecursionError",

src/tox/config/source/ini_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from tox.config.loader.ini.factor import extend_factors, expand_ranges
3+
from tox.config.loader.ini.factor import expand_ranges, extend_factors
44
from tox.config.loader.section import Section
55

66

0 commit comments

Comments
 (0)