Various lint appeasements.
This commit is contained in:
parent
5f201f99a1
commit
39e0aaed71
13 changed files with 30 additions and 16 deletions
|
@ -27,7 +27,7 @@ def adbinstall_argparse(args):
|
||||||
patterns = pipeable.input_many(args.apks, skip_blank=True, strip=True)
|
patterns = pipeable.input_many(args.apks, skip_blank=True, strip=True)
|
||||||
apks = [file for pattern in patterns for file in winglob.glob(pattern)]
|
apks = [file for pattern in patterns for file in winglob.glob(pattern)]
|
||||||
installs = []
|
installs = []
|
||||||
for apk in args.apks:
|
for apk in apks:
|
||||||
apk = pathclass.Path(apk)
|
apk = pathclass.Path(apk)
|
||||||
if apk.is_dir:
|
if apk.is_dir:
|
||||||
files = apk.glob('*.apk')
|
files = apk.glob('*.apk')
|
||||||
|
|
|
@ -11,7 +11,6 @@ flags:
|
||||||
--recurse:
|
--recurse:
|
||||||
Also check subdirectories.
|
Also check subdirectories.
|
||||||
'''
|
'''
|
||||||
import os
|
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,14 @@ def subtitle_maps(input_file, moveto=None):
|
||||||
moveto=moveto,
|
moveto=moveto,
|
||||||
)
|
)
|
||||||
|
|
||||||
def ffstreams(input_file, do_videos=False, do_audios=False, do_subtitles=False, dry=False, moveto=None):
|
def ffstreams(
|
||||||
|
input_file,
|
||||||
|
do_videos=False,
|
||||||
|
do_audios=False,
|
||||||
|
do_subtitles=False,
|
||||||
|
dry=False,
|
||||||
|
moveto=None,
|
||||||
|
):
|
||||||
maps = []
|
maps = []
|
||||||
if do_videos:
|
if do_videos:
|
||||||
maps.extend(video_maps(input_file, moveto=moveto))
|
maps.extend(video_maps(input_file, moveto=moveto))
|
||||||
|
|
|
@ -23,7 +23,11 @@ def filepull(pull_from='.', autoyes=False):
|
||||||
duplicate_count.setdefault(basename, [])
|
duplicate_count.setdefault(basename, [])
|
||||||
duplicate_count[basename].append(f.absolute_path)
|
duplicate_count[basename].append(f.absolute_path)
|
||||||
|
|
||||||
duplicates = ['\n'.join(sorted(copies)) for (basename, copies) in duplicate_count.items() if len(copies) > 1]
|
duplicates = [
|
||||||
|
'\n'.join(sorted(copies))
|
||||||
|
for (basename, copies) in duplicate_count.items()
|
||||||
|
if len(copies) > 1
|
||||||
|
]
|
||||||
duplicates = sorted(duplicates)
|
duplicates = sorted(duplicates)
|
||||||
if len(duplicates) > 0:
|
if len(duplicates) > 0:
|
||||||
raise Exception('duplicate names:\n' + '\n'.join(duplicates))
|
raise Exception('duplicate names:\n' + '\n'.join(duplicates))
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
'''
|
'''
|
||||||
Copy your file every few minutes while you work on it, so that you can have snapshots of its history.
|
Copy your file every few minutes while you work on it, so that you can have
|
||||||
Not a replacement for real version control but could be applicable in very simple situations or in
|
snapshots of its history.
|
||||||
cases where e.g. git is not.
|
Not a replacement for real version control but could be applicable in very
|
||||||
|
simple situations or in cases where e.g. git is not.
|
||||||
'''
|
'''
|
||||||
import argparse
|
import argparse
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
|
@ -3,7 +3,6 @@ import sys
|
||||||
|
|
||||||
from voussoirkit import pathclass
|
from voussoirkit import pathclass
|
||||||
from voussoirkit import pipeable
|
from voussoirkit import pipeable
|
||||||
from voussoirkit import spinal
|
|
||||||
from voussoirkit import winglob
|
from voussoirkit import winglob
|
||||||
|
|
||||||
def nonempty_directories_argparse(args):
|
def nonempty_directories_argparse(args):
|
||||||
|
|
|
@ -154,7 +154,8 @@ def write_setup(setup_py):
|
||||||
################################################################################
|
################################################################################
|
||||||
def git_assert_current_greater_than_latest(latest_release_version, new_version):
|
def git_assert_current_greater_than_latest(latest_release_version, new_version):
|
||||||
if latest_release_version >= semver_split(new_version):
|
if latest_release_version >= semver_split(new_version):
|
||||||
raise VersionOutOfOrder(f'New version should be {new_version} but {latest_release_version} already exists.')
|
msg = f'New version should be {new_version} but {latest_release_version} already exists.'
|
||||||
|
raise VersionOutOfOrder(msg)
|
||||||
|
|
||||||
def git_assert_no_stashes():
|
def git_assert_no_stashes():
|
||||||
command = [GIT, 'stash', 'list']
|
command = [GIT, 'stash', 'list']
|
||||||
|
|
|
@ -6,7 +6,6 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import traceback
|
|
||||||
|
|
||||||
from voussoirkit import betterhelp
|
from voussoirkit import betterhelp
|
||||||
from voussoirkit import bytestring
|
from voussoirkit import bytestring
|
||||||
|
@ -410,8 +409,10 @@ def rarpar(
|
||||||
|
|
||||||
def move_rars():
|
def move_rars():
|
||||||
move(f'{workdir.absolute_path}\\{basename}*.rar', f'{moveto.absolute_path}')
|
move(f'{workdir.absolute_path}\\{basename}*.rar', f'{moveto.absolute_path}')
|
||||||
|
|
||||||
def move_revs():
|
def move_revs():
|
||||||
move(f'{workdir.absolute_path}\\{basename}*.rev', f'{moveto.absolute_path}')
|
move(f'{workdir.absolute_path}\\{basename}*.rev', f'{moveto.absolute_path}')
|
||||||
|
|
||||||
def move_pars():
|
def move_pars():
|
||||||
move(f'{workdir.absolute_path}\\{basename}*.par2', f'{moveto.absolute_path}')
|
move(f'{workdir.absolute_path}\\{basename}*.par2', f'{moveto.absolute_path}')
|
||||||
|
|
||||||
|
|
1
rejpg.py
1
rejpg.py
|
@ -6,7 +6,6 @@ import io
|
||||||
import os
|
import os
|
||||||
import PIL.Image
|
import PIL.Image
|
||||||
import PIL.ImageFile
|
import PIL.ImageFile
|
||||||
import string
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from voussoirkit import bytestring
|
from voussoirkit import bytestring
|
||||||
|
|
|
@ -30,7 +30,6 @@ new_h:
|
||||||
JPEG compression quality.
|
JPEG compression quality.
|
||||||
'''
|
'''
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import PIL.Image
|
import PIL.Image
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,8 @@ import sys
|
||||||
|
|
||||||
from voussoirkit import passwordy
|
from voussoirkit import passwordy
|
||||||
from voussoirkit import pathclass
|
from voussoirkit import pathclass
|
||||||
from voussoirkit import pipeable
|
|
||||||
from voussoirkit import spinal
|
from voussoirkit import spinal
|
||||||
from voussoirkit import vlogging
|
from voussoirkit import vlogging
|
||||||
from voussoirkit import winglob
|
|
||||||
|
|
||||||
log = vlogging.getLogger(__name__, 'sole_subdir_lift')
|
log = vlogging.getLogger(__name__, 'sole_subdir_lift')
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,13 @@ def clean_url_list(urls):
|
||||||
|
|
||||||
def download_thread(url, filename, *, bytespersecond=None, headers=None, timeout=None):
|
def download_thread(url, filename, *, bytespersecond=None, headers=None, timeout=None):
|
||||||
print(f' Starting "{filename}"')
|
print(f' Starting "{filename}"')
|
||||||
downloady.download_file(url, filename, bytespersecond=bytespersecond, headers=headers, timeout=timeout)
|
downloady.download_file(
|
||||||
|
url,
|
||||||
|
filename,
|
||||||
|
bytespersecond=bytespersecond,
|
||||||
|
headers=headers,
|
||||||
|
timeout=timeout,
|
||||||
|
)
|
||||||
print(f'+Finished "{filename}"')
|
print(f'+Finished "{filename}"')
|
||||||
|
|
||||||
def remove_finished(threads):
|
def remove_finished(threads):
|
||||||
|
|
Loading…
Reference in a new issue