mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Merge pull request #1597 from clinton-hall/flake8/comprehensions
Flake8/comprehensions
This commit is contained in:
commit
23a450f095
3 changed files with 4 additions and 3 deletions
|
@ -713,7 +713,7 @@ def combine_vts(vts_path):
|
||||||
|
|
||||||
def combine_cd(combine):
|
def combine_cd(combine):
|
||||||
new_files = []
|
new_files = []
|
||||||
for item in set([re.match('(.+)[cC][dD][0-9].', item).groups()[0] for item in combine]):
|
for item in {re.match('(.+)[cC][dD][0-9].', item).groups()[0] for item in combine}:
|
||||||
concat = ''
|
concat = ''
|
||||||
for n in range(99):
|
for n in range(99):
|
||||||
files = [file for file in combine if
|
files = [file for file in combine if
|
||||||
|
|
|
@ -67,10 +67,10 @@ def remote_dir(path):
|
||||||
|
|
||||||
def get_dir_size(input_path):
|
def get_dir_size(input_path):
|
||||||
prepend = partial(os.path.join, input_path)
|
prepend = partial(os.path.join, input_path)
|
||||||
return sum([
|
return sum(
|
||||||
(os.path.getsize(f) if os.path.isfile(f) else get_dir_size(f))
|
(os.path.getsize(f) if os.path.isfile(f) else get_dir_size(f))
|
||||||
for f in map(prepend, os.listdir(text_type(input_path)))
|
for f in map(prepend, os.listdir(text_type(input_path)))
|
||||||
])
|
)
|
||||||
|
|
||||||
|
|
||||||
def remove_empty_folders(path, remove_root=True):
|
def remove_empty_folders(path, remove_root=True):
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -50,6 +50,7 @@ per-file-ignores =
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
flake8-commas
|
flake8-commas
|
||||||
|
flake8-comprehensions
|
||||||
flake8-quotes
|
flake8-quotes
|
||||||
skip_install = true
|
skip_install = true
|
||||||
commands =
|
commands =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue