From 0c0acdd84378bd356d15aa6cd6c5da6d60eedf29 Mon Sep 17 00:00:00 2001 From: Joey Territo Date: Tue, 22 Dec 2020 21:56:00 -0500 Subject: [PATCH] Reformat updater.py and utils.py to match pycodestyle --- dotdrop/updater.py | 3 ++- dotdrop/utils.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dotdrop/updater.py b/dotdrop/updater.py index de38e21..c1b6ebd 100644 --- a/dotdrop/updater.py +++ b/dotdrop/updater.py @@ -281,7 +281,8 @@ class Updater: for ignore in self.ignores: for name in names: path = os.path.join(src, name) - if ignore.startswith('!') and fnmatch.fnmatch(path, ignore[1:]): + if ignore.startswith('!') and \ + fnmatch.fnmatch(path, ignore[1:]): # add to whitelist whitelist.add(name) elif fnmatch.fnmatch(path, ignore): diff --git a/dotdrop/utils.py b/dotdrop/utils.py index a601992..918f873 100644 --- a/dotdrop/utils.py +++ b/dotdrop/utils.py @@ -204,7 +204,8 @@ def must_ignore(paths, ignores, debug=False): return False if debug: LOG.dbg('must ignore? \"{}\" against {}'.format(paths, ignores)) - ignored_negative, ignored = categorize(lambda ign: ign.startswith('!'), ignores) + ignored_negative, ignored = categorize( + lambda ign: ign.startswith('!'), ignores) for p in paths: ignore_matches = [] # First ignore dotfiles @@ -387,5 +388,5 @@ def categorize(function, iterable): function(element) is true for each element and for which function(element) is false for each element""" - return tuple(filter(function, iterable)),\ - tuple(itertools.filterfalse(function, iterable)) + return (tuple(filter(function, iterable)), + tuple(itertools.filterfalse(function, iterable)))