From 37d2c7c684bc84660eb287d0dfaba946accf7dc9 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Tue, 8 Mar 2022 15:46:08 +0100 Subject: [PATCH] linting --- scripts/yaml-toml.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/yaml-toml.py b/scripts/yaml-toml.py index adaa406..8b70bc9 100755 --- a/scripts/yaml-toml.py +++ b/scripts/yaml-toml.py @@ -10,6 +10,7 @@ import json # pip install toml deepdiff + def _yaml_load(path): """load from yaml""" with open(path, 'r', encoding='utf8') as file: @@ -18,6 +19,7 @@ def _yaml_load(path): content = data.load(file) return content + def _yaml_dump(content, where): """dump to yaml""" data = yaml() @@ -26,6 +28,7 @@ def _yaml_dump(content, where): data.typ = 'rt' data.dump(content, where) + def _toml_load(path): """load from toml""" with open(path, 'r', encoding='utf8') as file: @@ -33,10 +36,12 @@ def _toml_load(path): content = toml.loads(data) return content + def _toml_dump(content, where): with open(where, 'w') as f: toml.dump(content, f) + if __name__ == '__main__': if len(sys.argv) < 3: print("usage:")