mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 03:39:15 +00:00
linting
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,6 +7,8 @@ build/
|
|||||||
tags
|
tags
|
||||||
env
|
env
|
||||||
venv
|
venv
|
||||||
|
.pytest_cache
|
||||||
|
.mypy_cache
|
||||||
|
|
||||||
# coverage stuff
|
# coverage stuff
|
||||||
.coverage
|
.coverage
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class FTreeDir:
|
|||||||
fpath = os.path.join(root, file)
|
fpath = os.path.join(root, file)
|
||||||
if must_ignore([fpath], ignores=self.ignores,
|
if must_ignore([fpath], ignores=self.ignores,
|
||||||
debug=self.debug, strict=True):
|
debug=self.debug, strict=True):
|
||||||
self.log.dbg('ignoring file {fpath}')
|
self.log.dbg(f'ignoring file {fpath}')
|
||||||
continue
|
continue
|
||||||
self.log.dbg(f'added file to list of {self.path}: {fpath}')
|
self.log.dbg(f'added file to list of {self.path}: {fpath}')
|
||||||
self.entries.append(fpath)
|
self.entries.append(fpath)
|
||||||
@@ -46,7 +46,7 @@ class FTreeDir:
|
|||||||
dpath = os.path.join(root, dname)
|
dpath = os.path.join(root, dname)
|
||||||
if dir_empty(dpath):
|
if dir_empty(dpath):
|
||||||
# ignore empty directory
|
# ignore empty directory
|
||||||
self.log.dbg('ignoring empty dir {dpath}')
|
self.log.dbg(f'ignoring empty dir {dpath}')
|
||||||
continue
|
continue
|
||||||
# appending "/" allows to ensure pattern
|
# appending "/" allows to ensure pattern
|
||||||
# like "*/dir/*" will match the content of the directory
|
# like "*/dir/*" will match the content of the directory
|
||||||
@@ -54,7 +54,7 @@ class FTreeDir:
|
|||||||
dpath += os.path.sep
|
dpath += os.path.sep
|
||||||
if must_ignore([dpath], ignores=self.ignores,
|
if must_ignore([dpath], ignores=self.ignores,
|
||||||
debug=self.debug, strict=True):
|
debug=self.debug, strict=True):
|
||||||
self.log.dbg('ignoring dir {dpath}')
|
self.log.dbg(f'ignoring dir {dpath}')
|
||||||
continue
|
continue
|
||||||
self.log.dbg(f'added dir to list of {self.path}: {dpath}')
|
self.log.dbg(f'added dir to list of {self.path}: {dpath}')
|
||||||
self.entries.append(dpath)
|
self.entries.append(dpath)
|
||||||
|
|||||||
@@ -251,7 +251,6 @@ class Importer:
|
|||||||
self.log.dbg(f"trans failed: {in_fs}")
|
self.log.dbg(f"trans failed: {in_fs}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
if not os.path.isdir(in_fs):
|
if not os.path.isdir(in_fs):
|
||||||
# handle file
|
# handle file
|
||||||
self._import_file_to_dotpath(in_fs, in_dotpath_abs)
|
self._import_file_to_dotpath(in_fs, in_dotpath_abs)
|
||||||
@@ -263,7 +262,7 @@ class Importer:
|
|||||||
|
|
||||||
self.log.dbg(f'{len(fstree.get_entries())} files to import')
|
self.log.dbg(f'{len(fstree.get_entries())} files to import')
|
||||||
for entry in fstree.get_entries():
|
for entry in fstree.get_entries():
|
||||||
self.log.dbg("importing {entry}...")
|
self.log.dbg(f"importing {entry}...")
|
||||||
src = os.path.join(in_fs, entry)
|
src = os.path.join(in_fs, entry)
|
||||||
rel_src = os.path.relpath(entry, in_fs)
|
rel_src = os.path.relpath(entry, in_fs)
|
||||||
dst = os.path.join(in_dotpath_abs, rel_src)
|
dst = os.path.join(in_dotpath_abs, rel_src)
|
||||||
|
|||||||
Reference in New Issue
Block a user