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

Inline comments in tox.ini cause error #34

Open
webknjaz opened this issue Apr 14, 2019 · 0 comments
Open

Inline comments in tox.ini cause error #34

webknjaz opened this issue Apr 14, 2019 · 0 comments

Comments

@webknjaz
Copy link

  • Dependency Parser version: N/A
  • Python version: 3.7
  • Operating System: GNU/Linux

Description

Tox parses deps with comments as part of dep names. I know that it's not a parsed bug essentially but it would be nice to allow putting such comments on top of those deps lines instead of inline.

What I Did

So there's this in tox.ini:

deps =
    yapf>=0.25.0,<0.27  # pyup: < 0.27 # disable updates, conflicts with flake8 as per https://github.com/ansible/molecule/pull/1915

And tox tries to pip install "yapf>=0.25.0,<0.27 # pyup: < 0.27 # disable updates, conflicts with flake8 as per https://github.com/ansible/molecule/pull/1915" under the hood with fails with

ERROR: could not install deps [flake8>=3.6.0,<4, yamllint>=1.11.1,<2, mock==2.0.0, pytest==3.6.0, pytest-cov==2.6.0, pytest-helpers-namespace==2019.1.8, pytest-mock==1.10.0, pytest-verbose-parametrize==1.4.0, pytest-xdist==1.26.0, shade==1.22.2, yapf>=0.25.0,<0.27  # pyup: < 0.27 # disable updates, conflicts with flake8 as per https://github.com/ansible/molecule/pull/1915, ansible>=2.7,<2.8]; v = InvocationError("/home/travis/build/ansible/molecule/.tox/ansible27-unit/bin/python -m pip install 'flake8>=3.6.0,<4' 'yamllint>=1.11.1,<2' mock==2.0.0 pytest==3.6.0 pytest-cov==2.6.0 pytest-helpers-namespace==2019.1.8 pytest-mock==1.10.0 pytest-verbose-parametrize==1.4.0 pytest-xdist==1.26.0 shade==1.22.2 'yapf>=0.25.0,<0.27  # pyup: < 0.27 # disable updates, conflicts with flake8 as per https://github.com/ansible/molecule/pull/1915' 'ansible>=2.7,<2.8'", 1)
gaborbernat pushed a commit to tox-dev/tox that referenced this issue Apr 17, 2019
This enables users to have inline comments in deps lines in `tox.ini`. In particular, this allows having pyup bot integration.

Ref: pyupio/dparse#34
Ref: ansible/molecule#1973

Fixes #1260
@rafaelpivato rafaelpivato changed the title [BUG] tox.ini doesn't support inline comments Inline comments in tox.ini cause error Mar 23, 2020
@github-actions github-actions bot removed the bug label Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants