mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 18:59:16 +00:00
lint scripts
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# pylint: disable-msg=C0103
|
||||||
"""
|
"""
|
||||||
author: deadc0de6 (https://github.com/deadc0de6)
|
author: deadc0de6 (https://github.com/deadc0de6)
|
||||||
Copyright (c) 2018, deadc0de6
|
Copyright (c) 2018, deadc0de6
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# pylint: disable-msg=C0103
|
||||||
"""
|
"""
|
||||||
author: deadc0de6 (https://github.com/deadc0de6)
|
author: deadc0de6 (https://github.com/deadc0de6)
|
||||||
Copyright (c) 2022, deadc0de6
|
Copyright (c) 2022, deadc0de6
|
||||||
@@ -24,20 +25,20 @@ def yaml_load(path):
|
|||||||
|
|
||||||
def replace_none(content):
|
def replace_none(content):
|
||||||
"""replace any occurence of None with empty string"""
|
"""replace any occurence of None with empty string"""
|
||||||
n = {}
|
new = {}
|
||||||
for k in content:
|
for k in content:
|
||||||
if content[k] is None:
|
if content[k] is None:
|
||||||
if k == 'dotfiles':
|
if k == 'dotfiles':
|
||||||
continue
|
continue
|
||||||
if k == 'profiles':
|
if k == 'profiles':
|
||||||
continue
|
continue
|
||||||
n[k] = ""
|
new[k] = ""
|
||||||
continue
|
continue
|
||||||
if isinstance(content[k], dict):
|
if isinstance(content[k], dict):
|
||||||
n[k] = replace_none(content[k])
|
new[k] = replace_none(content[k])
|
||||||
continue
|
continue
|
||||||
n[k] = content[k]
|
new[k] = content[k]
|
||||||
return n
|
return new
|
||||||
|
|
||||||
|
|
||||||
def toml_dump(content):
|
def toml_dump(content):
|
||||||
|
|||||||
Reference in New Issue
Block a user