replace has_matching_label
with has_matching_label?
This commit is contained in:
parent
eb0a17ba4b
commit
e6c7c11a5b
2 changed files with 5 additions and 2 deletions
|
@ -244,8 +244,11 @@ Style/PerlBackrefs:
|
|||
# NameWhitelist: is_a?
|
||||
Style/PredicateName:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'features/*'
|
||||
# NamePrefix: is_
|
||||
NamePrefixBlacklist: is_
|
||||
NameWhitelist: has_n_stars
|
||||
|
||||
# Offense count: 58
|
||||
# Cop supports --auto-correct.
|
||||
|
|
|
@ -42,13 +42,13 @@ module Gitlab
|
|||
|
||||
lookup = series.each_slice(MAX_QUERY_ITEMS).flat_map do |batched_series|
|
||||
client_series(*batched_series, start: timeframe_start, stop: timeframe_end)
|
||||
.select(&method(:has_matching_label))
|
||||
.select(&method(:has_matching_label?))
|
||||
.map { |series_info| [series_info['__name__'], true] }
|
||||
end
|
||||
lookup.to_h
|
||||
end
|
||||
|
||||
def has_matching_label(series_info)
|
||||
def has_matching_label?(series_info)
|
||||
series_info.key?('environment')
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue