Skip to content

Commit 75cd3f3

Browse files
committed
Opt: Allow both PR and PRY in research filter string (#1716)
1 parent a47cf1d commit 75cd3f3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

module/research/selector.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,14 @@ def research_sort_filter(self, enforce=False):
141141
self.config.Research_UsePart))
142142
logger.attr('Allow delay', self.config.Research_AllowDelay)
143143

144+
# Case insensitive
145+
string = string.lower()
144146
# Filter uses `hakuryu`, but allows both `hakuryu` and `hakuryuu`
145-
string = string.lower().replace('hakuryuu', 'hakuryu')
147+
string = string.replace('hakuryuu', 'hakuryu')
148+
# Allow both `fastest` and `shortest`
149+
string = string.replace('fastest', 'shortest')
150+
# Allow both `PR` and `PRY`
151+
string = re.sub(r'pr([\d\- >])', r'pry\1', string)
146152

147153
FILTER.load(string)
148154
priority = FILTER.apply(self.projects, func=partial(self._research_check, enforce=enforce))

0 commit comments

Comments
 (0)