fix: black
This commit is contained in:
parent
f0b5cf3367
commit
6824ce4190
2 changed files with 9 additions and 5 deletions
|
|
@ -15,6 +15,7 @@ details.
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
from rougail.error import ExtentionError
|
from rougail.error import ExtentionError
|
||||||
|
|
@ -33,6 +34,7 @@ class RougailUserDataYaml:
|
||||||
) -> None:
|
) -> None:
|
||||||
if rougailconfig is None:
|
if rougailconfig is None:
|
||||||
from rougail import RougailConfig
|
from rougail import RougailConfig
|
||||||
|
|
||||||
rougailconfig = RougailConfig
|
rougailconfig = RougailConfig
|
||||||
user_data = rougailconfig["step.user_data"]
|
user_data = rougailconfig["step.user_data"]
|
||||||
if "yaml" not in user_data:
|
if "yaml" not in user_data:
|
||||||
|
|
@ -71,11 +73,11 @@ class RougailUserDataYaml:
|
||||||
file_values,
|
file_values,
|
||||||
filename,
|
filename,
|
||||||
)
|
)
|
||||||
if self.file_with_secrets == 'none':
|
if self.file_with_secrets == "none":
|
||||||
allow_secrets_variables = False
|
allow_secrets_variables = False
|
||||||
elif self.file_with_secrets == 'first':
|
elif self.file_with_secrets == "first":
|
||||||
allow_secrets_variables = idx == 0
|
allow_secrets_variables = idx == 0
|
||||||
elif self.file_with_secrets == 'last':
|
elif self.file_with_secrets == "last":
|
||||||
if not idx:
|
if not idx:
|
||||||
last_filenames = len(self.filenames) - 1
|
last_filenames = len(self.filenames) - 1
|
||||||
allow_secrets_variables = idx == last_filenames
|
allow_secrets_variables = idx == last_filenames
|
||||||
|
|
@ -87,8 +89,9 @@ class RougailUserDataYaml:
|
||||||
"errors": self.errors,
|
"errors": self.errors,
|
||||||
"warnings": self.warnings,
|
"warnings": self.warnings,
|
||||||
"values": values,
|
"values": values,
|
||||||
'options': {'allow_secrets_variables': allow_secrets_variables,
|
"options": {
|
||||||
},
|
"allow_secrets_variables": allow_secrets_variables,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return user_datas
|
return user_datas
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ details.
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue