Skip to content

Commit 75eb833

Browse files
committed
Tighten data type for to_python / to_ruby
The Any data type accepts data we should probably not try to serialize, e.g. [default, Timestamp(), /.*/, Car(regnbr => 'abc123'), Integer[0,10], Deferred('f', [1,2,3]), Resource['file', '/tmp/tmp.txt']] Prefer the Data data type.
1 parent 7e69980 commit 75eb833

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/puppet/functions/to_python.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
Puppet::Functions.create_function(:to_python) do
1818
dispatch :to_python do
19-
param 'Any', :object
19+
param 'Data', :object
2020
end
2121

2222
# @param object

lib/puppet/functions/to_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
Puppet::Functions.create_function(:to_ruby) do
1818
dispatch :to_ruby do
19-
param 'Any', :object
19+
param 'Data', :object
2020
end
2121

2222
# @param object

0 commit comments

Comments
 (0)