Completed
Pull Request — master (#2849)
by Lakshmi
06:23
created

YamlStringToObject.run()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
1
import yaml
2
3
from st2actions.runners.pythonrunner import Action
4
5
6
class YamlStringToObject(Action):
7
8
    def run(self, yaml_str):
9
        return yaml.safe_load(yaml_str)
10