From f048f58137ede5c10f91e9b0a0526742477c1fb2 Mon Sep 17 00:00:00 2001 From: redxef Date: Wed, 28 Sep 2022 15:59:12 +0200 Subject: [PATCH] Add coding header to all files. --- adapters/google.py | 3 +++ adapters/utils.py | 14 +++++++------- adapters/wordpress.py | 3 +++ main.py | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/adapters/google.py b/adapters/google.py index 170d221..062a3ec 100644 --- a/adapters/google.py +++ b/adapters/google.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + import tempfile import datetime import os.path diff --git a/adapters/utils.py b/adapters/utils.py index f44eac2..f7e5000 100644 --- a/adapters/utils.py +++ b/adapters/utils.py @@ -1,9 +1,9 @@ -import collections +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- - -def dict_merge(dct, merge_dct): - for k, v in merge_dct.items(): - if (k in dct and isinstance(dct[k], dict) and isinstance(merge_dct[k], dict)): #noqa - dict_merge(dct[k], merge_dct[k]) +def dict_merge(d0, d1): + for k, v in d1.items(): + if (k in d0 and isinstance(d0[k], dict) and isinstance(d1[k], dict)): + dict_merge(d0[k], d1[k]) else: - dct[k] = merge_dct[k] + d0[k] = d1[k] diff --git a/adapters/wordpress.py b/adapters/wordpress.py index 3d0e2f5..dac69e8 100644 --- a/adapters/wordpress.py +++ b/adapters/wordpress.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + import requests import urllib.parse import json diff --git a/main.py b/main.py index 7a90b1a..fe598b6 100755 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import sys import yaml