1
1
from itertools import product
2
-
3
2
from logging import getLogger
4
3
import os
5
4
import sys
@@ -42,7 +41,7 @@ def tox_add_core_config(core_conf: ConfigSet, state: State) -> None:
42
41
logger .debug ("original envlist: %s" , original_envlist .envs )
43
42
44
43
versions = get_python_version_keys ()
45
- logger .debug ("Python versions: {}" . format ( versions ) )
44
+ logger .debug ("Python versions: %s" , versions )
46
45
47
46
gh_actions_config = load_config (config )
48
47
logger .debug ("tox-gh-actions config: %s" , gh_actions_config )
@@ -166,6 +165,7 @@ def get_python_version_keys() -> List[str]:
166
165
- CPython 3.8.z => [3.8, 3]
167
166
- PyPy 3.6 (v7.3.z) => [pypy-3.6, pypy-3, pypy3]
168
167
- Pyston based on Python CPython 3.8.8 (v2.2) => [pyston-3.8, pyston-3]
168
+
169
169
"""
170
170
major_version = str (sys .version_info [0 ])
171
171
major_minor_version = "." .join ([str (i ) for i in sys .version_info [:2 ]])
@@ -226,11 +226,9 @@ def is_log_grouping_enabled(options: Parsed) -> bool:
226
226
227
227
def is_env_specified (config : Config ) -> bool :
228
228
"""Returns True when environments are explicitly given"""
229
- if hasattr (config .options , "env" ) and not config .options .env .is_default_list :
230
- # is_default_list becomes False when TOXENV is a non-empty string
231
- # and when command line argument (-e) is given.
232
- return True
233
- return False
229
+ # is_default_list becomes False when TOXENV is a non-empty string
230
+ # and when command line argument (-e) is given.
231
+ return hasattr (config .options , "env" ) and not config .options .env .is_default_list
234
232
235
233
236
234
def parse_factors_dict (value : str ) -> Dict [str , List [str ]]:
@@ -256,6 +254,7 @@ def parse_factors_dict(value: str) -> Dict[str, List[str]]:
256
254
257
255
def parse_dict (value : str ) -> Dict [str , str ]:
258
256
"""Parse a dict value from the tox config.
257
+
259
258
.. code-block: ini
260
259
[travis]
261
260
python =
0 commit comments