Skip to content

Commit

Permalink
Merge pull request #9413 from joshcooper/rubocop_1_65_0
Browse files Browse the repository at this point in the history
Add missing return
  • Loading branch information
mhashizume authored Jul 11, 2024
2 parents 7739378 + 214206f commit 40d9bd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
3 changes: 2 additions & 1 deletion lib/puppet/pops/evaluator/runtime3_resource_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def self.find_resource_type_or_class(scope, name)
end

def self.resource_to_ptype(resource)
nil if resource.nil?
return nil if resource.nil?

# inference returns the meta type since the 3x Resource is an alternate way to describe a type
Puppet::Pops::Types::TypeCalculator.singleton().infer(resource).type
end
Expand Down
6 changes: 0 additions & 6 deletions lib/puppet/pops/evaluator/runtime3_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,6 @@ def is_parameter_of_resource?(scope, resource, name)
resource.valid_parameter?(name)
end

def resource_to_ptype(resource)
nil if resource.nil?
# inference returns the meta type since the 3x Resource is an alternate way to describe a type
type_calculator.infer(resource).type
end

# This is the same type of "truth" as used in the current Puppet DSL.
#
def is_true?(value, o)
Expand Down
11 changes: 6 additions & 5 deletions lib/puppet/provider/package/pkgutil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ def self.parse_pkglist(output, hash = {})

# Identify common types of pkgutil noise as it downloads catalogs etc
def self.noise?(line)
true if line =~ /^#/
true if line =~ /^Checking integrity / # use_gpg
true if line =~ /^gpg: / # gpg verification
true if line =~ /^=+> / # catalog fetch
true if line =~ /\d+:\d+:\d+ URL:/ # wget without -q
return true if line =~ /^#/
return true if line =~ /^Checking integrity / # use_gpg
return true if line =~ /^gpg: / # gpg verification
return true if line =~ /^=+> / # catalog fetch
return true if line =~ /\d+:\d+:\d+ URL:/ # wget without -q

false
end

Expand Down

0 comments on commit 40d9bd8

Please sign in to comment.