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

Allow to use --devenv without tox config #1644

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Aug 6, 2020

Fixes #1643

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword in message body
  • added news fragment in changelog folder
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@@ -1056,7 +1061,7 @@ class ParseIni(object):
def __init__(self, config, ini_path, ini_data): # noqa
config.toxinipath = ini_path
using("tox.ini: {} (pid {})".format(config.toxinipath, os.getpid()))
config.toxinidir = config.toxinipath.dirpath()
config.toxinidir = config.toxinipath.dirpath() if ini_path.check(file=True) else ini_path
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this feels a bit like a hack. I've tried to pass None and adapt the code to not do certain things if this is None, but it was too messy.

@hroncok hroncok changed the title Allow to use --devenv without tox cnfig Allow to use --devenv without tox config Aug 6, 2020
@hroncok hroncok force-pushed the devenv_sans_config branch from bd6bf8c to 23ea4fd Compare August 6, 2020 11:26
@gaborbernat
Copy link
Member

gaborbernat commented Aug 6, 2020

I'll defer review and merge on this to my co-maintainer @asottile as he's the champion of this feature. But at a high level, I'm happy with what I see here.

Copy link
Contributor

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile merged commit 8317240 into tox-dev:master Aug 6, 2020
ssbarnea pushed a commit to ssbarnea/tox that referenced this pull request Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to run tox --devenv without config file
3 participants