1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 14:31:46 +00:00

lint scripts

This commit is contained in:
deadc0de6
2023-01-28 11:54:10 +01:00
committed by deadc0de
parent ba1cb8e5b6
commit 3be6a74a7b
2 changed files with 7 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# pylint: disable-msg=C0103
"""
author: deadc0de6 (https://github.com/deadc0de6)
Copyright (c) 2018, deadc0de6

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# pylint: disable-msg=C0103
"""
author: deadc0de6 (https://github.com/deadc0de6)
Copyright (c) 2022, deadc0de6
@@ -24,20 +25,20 @@ def yaml_load(path):
def replace_none(content):
"""replace any occurence of None with empty string"""
n = {}
new = {}
for k in content:
if content[k] is None:
if k == 'dotfiles':
continue
if k == 'profiles':
continue
n[k] = ""
new[k] = ""
continue
if isinstance(content[k], dict):
n[k] = replace_none(content[k])
new[k] = replace_none(content[k])
continue
n[k] = content[k]
return n
new[k] = content[k]
return new
def toml_dump(content):