jendrikseipp / vulture

Find dead Python code
MIT License
3.41k stars 150 forks source link

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

Closed bcbnz closed 4 years ago

bcbnz commented 4 years ago

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:

bcbnz commented 4 years ago

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

jendrikseipp commented 4 years ago

Thanks for reporting this and providing a clean fix!