Add a new split_comma_separated() utility function.

Review Request #11575 — Created April 5, 2021 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.0.x

Reviewers

This function standardizes splitting a comma-separated string into a
list of values, taking care to remove all extra whitespace and handling
multiple commas in a row.

The base file pattern support has been updated to use this, and some
upcoming tool work will benefit from it as well.

Unit tests pass on Python 2.7 and 3.x.

Used this function in the upcoming shellcheck work.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Add a new split_comma_separated() utility function.
This function standardizes splitting a comma-separated string into a list of values, taking care to remove all extra whitespace and handling multiple commas in a row. The base file pattern support has been updated to use this, and some upcoming tool work will benefit from it as well.
89c615b73fb54f93c65b6f1fb2d470ac651c3c39 Christian Hammond
bot/reviewbot/tools/base/mixins.py
bot/reviewbot/utils/text.py
bot/reviewbot/utils/tests/test_text.py
Loading...