Style fixes

A bunch of style fixes. Mostly white space and style import order
tweaks, but a few other stylistic changes are present too.
This commit is contained in:
Kevin Cathcart
2017-12-17 00:25:46 -05:00
parent 8b20e39588
commit 823657bc26
18 changed files with 224 additions and 212 deletions

View File

@@ -1,10 +1,9 @@
from collections import OrderedDict
from Utils import output_path
import os
import time
import logging
from Rom import LocalRom, apply_rom_settings
from Utils import output_path
from Rom import LocalRom, Sprite, apply_rom_settings
def adjust(args):
@@ -13,7 +12,7 @@ def adjust(args):
logger.info('Patching ROM.')
if args.sprite is not None:
if isinstance(args.sprite,Sprite):
if isinstance(args.sprite, Sprite):
sprite = args.sprite
else:
sprite = Sprite(args.sprite)
@@ -22,7 +21,7 @@ def adjust(args):
outfilebase = 'ER_adjusted'
if (os.stat(args.rom).st_size == 2097152 and os.path.splitext(args.rom)[-1].lower() == '.sfc'):
if os.stat(args.rom).st_size == 2097152 and os.path.splitext(args.rom)[-1].lower() == '.sfc':
rom = LocalRom(args.rom, False)
else:
raise RuntimeError('Provided Rom is not a valid Link to the Past Randomizer Rom. Please provide one for adjusting.')
@@ -32,6 +31,6 @@ def adjust(args):
rom.write_to_file(output_path('%s.sfc' % outfilebase))
logger.info('Done. Enjoy.')
logger.debug('Total Time: %s' % (time.clock() - start))
logger.debug('Total Time: %s', time.clock() - start)
return args