Skip to content

Commit 527453f

Browse files
committed
(PUP-11993) Style/RedundantFetchBlock
This commit enables the Style/RedundantFetchBlock cop and fixes 2 unsafe autocorrectable offenses.
1 parent 9c208c9 commit 527453f

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -658,12 +658,6 @@ Style/RedundantException:
658658
- 'lib/puppet/module_tool/tar.rb'
659659
- 'lib/puppet/pops/types/class_loader.rb'
660660

661-
# This cop supports unsafe auto-correction (--auto-correct-all).
662-
# Configuration parameters: SafeForConstants.
663-
Style/RedundantFetchBlock:
664-
Exclude:
665-
- 'lib/puppet/pops/types/p_sem_ver_range_type.rb'
666-
667661
# This cop supports safe auto-correction (--auto-correct).
668662
Style/RedundantInterpolation:
669663
Enabled: false

lib/puppet/pops/types/p_sem_ver_range_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def from_versions(min, max = :default, exclude_max = false)
158158
end
159159

160160
def from_hash(hash)
161-
from_versions(hash['min'], hash.fetch('max') { :default }, hash.fetch('exclude_max') { false })
161+
from_versions(hash['min'], hash.fetch('max', :default), hash.fetch('exclude_max', false))
162162
end
163163
end
164164
end

0 commit comments

Comments
 (0)