Skip to content

Commit

Permalink
Add empty line and parantheses
Browse files Browse the repository at this point in the history
  • Loading branch information
akash720 committed Sep 5, 2020
1 parent 61e8396 commit 6c5ad96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions random_file_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def check_ratio(x):
except ValueError:
raise argparse.ArgumentTypeError("%r not a floating-point literal" % (x,))

if x < 0.0 or x > 1.0:
if (x < 0.0 or x > 1.0):
raise argparse.ArgumentTypeError("%r not in range [0.0, 1.0]" % (x))
return x

Expand All @@ -37,7 +37,7 @@ def check_ratio(x):
ratio = args.ratio

files = os.listdir(src)
size = int(ratio*len(files))
size = int(ratio * len(files))

print('Move {} files from {} to {} ? [y/n]'.format(size, src, dest))
if input().lower() == 'y':
Expand All @@ -48,4 +48,4 @@ def check_ratio(x):
print(e)
print('Successful')
else:
print('Cancelled')
print('Cancelled')

0 comments on commit 6c5ad96

Please sign in to comment.