Fix lint
This commit is contained in:
parent
480e222d6d
commit
8f58d22ad7
@ -54,7 +54,7 @@ def elide(text, length):
|
|||||||
if len(text) <= length:
|
if len(text) <= length:
|
||||||
return text
|
return text
|
||||||
else:
|
else:
|
||||||
return text[:length-1] + '\u2026'
|
return text[:length - 1] + '\u2026'
|
||||||
|
|
||||||
|
|
||||||
def check_overflow(arg, ctype, fatal=True):
|
def check_overflow(arg, ctype, fatal=True):
|
||||||
|
@ -36,11 +36,11 @@ def remove(path):
|
|||||||
"""Remove either a file or directory unless --dry-run is given."""
|
"""Remove either a file or directory unless --dry-run is given."""
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
print("rm -r '{}'".format(path))
|
print("rm -r '{}'".format(path))
|
||||||
if not '--dry-run' in sys.argv:
|
if '--dry-run' not in sys.argv:
|
||||||
shutil.rmtree(path)
|
shutil.rmtree(path)
|
||||||
else:
|
else:
|
||||||
print("rm '{}'".format(path))
|
print("rm '{}'".format(path))
|
||||||
if not '--dry-run' in sys.argv:
|
if '--dry-run' not in sys.argv:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user