Skip to content

Conversation

@jfcherng
Copy link
Contributor

@jfcherng jfcherng commented Nov 1, 2020

The "selector" setting in v2 is a very long single-line string. That makes is unreadable and diff-unfriendly.

This PR proposes to make it into a list of selectors.

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@jfcherng jfcherng force-pushed the refactor/readable-selectors branch from 148077f to 54a6852 Compare November 1, 2020 12:10
Comment on lines +75 to +79
# old style discouraged single-string selector
selector = self.settings.get('selector')
if not selector:
# new style list of strings selectors
selector = "(" + ")|(".join(self.settings.get('selectors')) + ")"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# old style discouraged single-string selector
selector = self.settings.get('selector')
if not selector:
# new style list of strings selectors
selector = "(" + ")|(".join(self.settings.get('selectors')) + ")"
selector = "(" + ")|(".join(self.settings.get('selectors')) + ")"

Since the single-string selector was only publicly available on 2.0.0, I think we can get away with skipping this check

@cristianl cristianl merged commit 4bb976f into aziz:master Nov 1, 2020
@cristianl
Copy link
Collaborator

Released in 2.1.0. Thanks for the PRs!

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.

3 participants