Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Dec 29, 2023
1 parent 2688d00 commit 4a62342
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions dotdrop/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ def _match_ignore_pattern(path, pattern, debug=False):
"""
subpath = path
while subpath != os.path.sep:
#if debug:
# msg = f'fnmatch \"{subpath}\" against {pattern}'
# LOG.dbg(msg, force=True)
# if debug:
# msg = f'fnmatch \"{subpath}\" against {pattern}'
# LOG.dbg(msg, force=True)
ret = fnmatch.fnmatch(subpath, pattern)
if ret:
if debug:
Expand Down Expand Up @@ -277,10 +277,11 @@ def _must_ignore(path, ignores, neg_ignores, debug=False):
msg = f'NO MATCH negative ignore \"{pattern}\" against {path}'
LOG.dbg(msg, force=True)
continue
else:
if debug:
msg = f'MATCH negative ignore \"{pattern}\" against {path}'
LOG.dbg(msg, force=True)

if debug:
msg = f'MATCH negative ignore \"{pattern}\" against {path}'
LOG.dbg(msg, force=True)

# remove from the list
try:
match_ignore_pattern.remove(path)
Expand All @@ -292,10 +293,7 @@ def _must_ignore(path, ignores, neg_ignores, debug=False):
warn += 'that is being ignored by a '
warn += 'previous ignore pattern.'
LOG.warn(warn)
print(path)
print(match_ignore_pattern)
print(os.path.isdir(path))
print(neg_ignore_cnt)

if len(match_ignore_pattern) < 1:
# if debug:
# LOG.dbg(f'NOT ignoring \"{path}\"', force=True)
Expand Down

0 comments on commit 4a62342

Please sign in to comment.