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

Don't override TOML paths with empty CLI paths #228

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

bcbnz
Copy link
Contributor

@bcbnz bcbnz commented Sep 8, 2020

The paths CLI argument did not use the default=missing sentinel, and so
returned an empty list if no paths were given to the CLI. This meant any
paths configured in pyproject.toml were overridden with an empty list,
making the path= setting useless.

Adding the sentinel to the CLI fixes this behaviour. A regression test
is also added to make sure TOML paths are used if no CLI paths are
given.

Checklist:

  • I have updated the documentation in the README.md file or my changes don't require an update.
  • I have added an entry in CHANGELOG.md.
  • I have added or adapted tests to cover my changes.

The paths CLI argument did not use the default=missing sentinel, and so
returned an empty list if no paths were given to the CLI. This meant any
paths configured in pyproject.toml were overridden with an empty list,
making the path= setting useless.

Adding the sentinel to the CLI fixes this behaviour. A regression test
is also added to make sure TOML paths are used if no CLI paths are
given.
@bcbnz
Copy link
Contributor Author

bcbnz commented Sep 8, 2020

Force-pushed to fix style and add changelog entry with pull request ID.

@jendrikseipp jendrikseipp merged commit 0b421b5 into jendrikseipp:master Sep 8, 2020
@jendrikseipp
Copy link
Owner

Thanks for reporting this and providing a clean fix!

@bcbnz bcbnz deleted the config-paths branch September 8, 2020 12:32
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

Successfully merging this pull request may close these issues.

2 participants