Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start supporting inline comments #50

Closed
pytoxbot opened this issue Sep 17, 2016 · 3 comments
Closed

Start supporting inline comments #50

pytoxbot opened this issue Sep 17, 2016 · 3 comments
Labels

Comments

@pytoxbot
Copy link

pytoxbot commented Sep 17, 2016

Using tox 1.4.2 and python 2.7 on OSX I get

ERROR: unknown environment 'py32 # Python 3.1 and 3.0 might work as well.'

when running tox with the toxfile here: https://github.com/erikrose/more-itertools/blob/c0339068f094933504d095bb0d2c40577acf7c56/tox.ini

Moving the comment to a different line fixes the issue.

[update by @obestwalter to clarify the problem]

Example, comments like this will make tox fail, because it does not interpret:

[tox]
skipsdist = True  # THIS IS NO COMMENT FOR TOX!
envlist = standard-greeting

[testenv:standard-greeting]
deps =
  plumbum # THIS NEITHER!
  flask
commands =
  python -c 'print("Hello, world!")'  # AS YOU SEE IT'S UNIVERSAL!

output:

Traceback (most recent call last):
File "/home/oliver/.virtualenvs/tox/bin/tox", line 11, in <module>
  load_entry_point('tox', 'console_scripts', 'tox')()
File "/home/oliver/work/tox/tox/tox/session.py", line 38, in main
  config = prepare(args)
File "/home/oliver/work/tox/tox/tox/session.py", line 26, in prepare
  config = parseconfig(args)
File "/home/oliver/work/tox/tox/tox/config.py", line 242, in parseconfig
  parseini(config, inipath)
File "/home/oliver/work/tox/tox/tox/config.py", line 807, in __init__
  config.skipsdist = reader.getbool("skipsdist", all_develop)
File "/home/oliver/work/tox/tox/tox/config.py", line 998, in getbool
  "boolean value %r needs to be 'True' or 'False'")
tox.ConfigError: ConfigError: boolean value %r needs to be 'True' or 'False'
@pytoxbot
Copy link
Author

Original comment by @hpk42

well, we could allow comment-recognition for the env-variable i think. We just cannot do it for each line in the ini-file.

@pytoxbot
Copy link
Author

Original comment by @RonnyPfannschmidt

tox cannot consider such inline start characters comments
without breaking legitimate dependency listings and/or commands

@obestwalter
Copy link
Member

So this is a wontfix then, I guess.

luizirber added a commit to luizirber/zoo that referenced this issue Apr 3, 2017
@obestwalter obestwalter changed the title Tox 1.4.2 does not parse comments in the environment list Start supporting inline comments Sep 4, 2017
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants