Skip to content

Commit 665f4dd

Browse files
committed
puppet-lint: fix params_empty_string_assignment
1 parent 2bf0d38 commit 665f4dd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

REFERENCE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -783,19 +783,19 @@ Default value: `1800`
783783

784784
##### <a name="install_args"></a>`install_args`
785785

786-
Data type: `String`
786+
Data type: `Optional[String[1]]`
787787

788788
Any additional installation arguments that will be supplied when running pip install.
789789

790-
Default value: `''`
790+
Default value: ``undef``
791791

792792
##### <a name="uninstall_args"></a>`uninstall_args`
793793

794-
Data type: `String`
794+
Data type: `Optional[String[1]]`
795795

796796
Any additional arguments that will be supplied when running pip uninstall.
797797

798-
Default value: `''`
798+
Default value: ``undef``
799799

800800
##### <a name="log_dir"></a>`log_dir`
801801

@@ -1070,11 +1070,11 @@ Default value: ``undef``
10701070

10711071
##### <a name="extra_pip_args"></a>`extra_pip_args`
10721072

1073-
Data type: `String`
1073+
Data type: `Optional[String[1]]`
10741074

10751075
Extra arguments to pass to pip after the requirements file
10761076

1077-
Default value: `''`
1077+
Default value: ``undef``
10781078

10791079
##### <a name="manage_requirements"></a>`manage_requirements`
10801080

manifests/pip.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
Boolean $editable = false,
6363
Array $environment = [],
6464
Array $extras = [],
65-
String $install_args = '',
66-
String $uninstall_args = '',
65+
Optional[String[1]] $install_args = undef,
66+
Optional[String[1]] $uninstall_args = undef,
6767
Numeric $timeout = 1800,
6868
String[1] $log_dir = '/tmp',
6969
Array[String] $path = ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -127,11 +127,11 @@
127127
}
128128

129129
# TODO: Do more robust argument checking, but below is a start
130-
if ($ensure == absent) and ($install_args != '') {
130+
if ($ensure == absent) and $install_args {
131131
fail('python::pip cannot provide install_args with ensure => absent')
132132
}
133133

134-
if ($ensure == present) and ($uninstall_args != '') {
134+
if ($ensure == present) and $uninstall_args {
135135
fail('python::pip cannot provide uninstall_args with ensure => present')
136136
}
137137

manifests/requirements.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
Array $environment = [],
3737
Boolean $forceupdate = false,
3838
Optional[Stdlib::Absolutepath] $cwd = undef,
39-
String $extra_pip_args = '',
39+
Optional[String[1]] $extra_pip_args = undef,
4040
Boolean $manage_requirements = true,
4141
Boolean $fix_requirements_owner = true,
4242
Stdlib::Absolutepath $log_dir = '/tmp',

0 commit comments

Comments
 (0)