mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-05 23:09:32 +01:00
add: dont use 'file' as var name during iteration
This commit is contained in:
+6
-6
@@ -25,12 +25,12 @@ def add(repo, target, recursive=False, no_commit=False, fname=None):
|
||||
def _find_all_targets(repo, target, recursive):
|
||||
if os.path.isdir(target) and recursive:
|
||||
return [
|
||||
file
|
||||
for file in walk_files(target)
|
||||
if not repo.is_dvc_internal(file)
|
||||
if not Stage.is_stage_file(file)
|
||||
if not repo.scm.belongs_to_scm(file)
|
||||
if not repo.scm.is_tracked(file)
|
||||
fname
|
||||
for fname in walk_files(target)
|
||||
if not repo.is_dvc_internal(fname)
|
||||
if not Stage.is_stage_file(fname)
|
||||
if not repo.scm.belongs_to_scm(fname)
|
||||
if not repo.scm.is_tracked(fname)
|
||||
]
|
||||
return [target]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user