mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 22:12:53 +01:00
Renamed ignore to _ignore to prevent mypy error
This commit is contained in:
parent
10c0aa3f6a
commit
bbe4fb454b
1 changed files with 5 additions and 3 deletions
|
|
@ -210,7 +210,9 @@ def sorted_walk(
|
|||
"""
|
||||
# Make sure the paths aren't Unicode strings.
|
||||
bytes_path = bytestring_path(path)
|
||||
ignore = [bytestring_path(i) for i in ignore]
|
||||
_ignore = [ # rename prevents mypy variable shadowing issue
|
||||
bytestring_path(i) for i in ignore
|
||||
]
|
||||
|
||||
# Get all the directories and files at this level.
|
||||
try:
|
||||
|
|
@ -230,7 +232,7 @@ def sorted_walk(
|
|||
|
||||
# Skip ignored filenames.
|
||||
skip = False
|
||||
for pat in ignore:
|
||||
for pat in _ignore:
|
||||
if fnmatch.fnmatch(base, pat):
|
||||
if logger:
|
||||
logger.debug(
|
||||
|
|
@ -257,7 +259,7 @@ def sorted_walk(
|
|||
# Recurse into directories.
|
||||
for base in dirs:
|
||||
cur = os.path.join(bytes_path, base)
|
||||
yield from sorted_walk(cur, ignore, ignore_hidden, logger)
|
||||
yield from sorted_walk(cur, _ignore, ignore_hidden, logger)
|
||||
|
||||
|
||||
def path_as_posix(path: bytes) -> bytes:
|
||||
|
|
|
|||
Loading…
Reference in a new issue