add tox && use black and pylint
This commit is contained in:
parent
527311df59
commit
12ae5caaa9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
venv/
|
venv/
|
||||||
|
.tox/
|
||||||
dist/
|
dist/
|
||||||
assm/__pycache__
|
assm/__pycache__
|
||||||
images/
|
images/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""iOS splash screen generator"""
|
"""iOS splash screen generator"""
|
||||||
|
|
||||||
|
import sys
|
||||||
import os
|
import os
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from assm.devices import APPLE_DEVICES
|
from assm.devices import APPLE_DEVICES
|
||||||
@ -26,7 +27,7 @@ def make_splash_image(screen_orientation, screen_width, screen_height, logo_path
|
|||||||
if str(e) == 'bad transparency mask':
|
if str(e) == 'bad transparency mask':
|
||||||
print('ERROR: Bad transparency mask.')
|
print('ERROR: Bad transparency mask.')
|
||||||
|
|
||||||
quit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
return splash_image
|
return splash_image
|
||||||
|
|
||||||
@ -51,9 +52,9 @@ def main(output_folder='./images/'):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
splash = make_splash_image('portrait', device_w, device_h, 'logo.png')
|
splash = make_splash_image('portrait', device_w, device_h, 'logo.png')
|
||||||
except FileNotFoundError as e:
|
except FileNotFoundError:
|
||||||
print('ERROR: File logo.png not found.')
|
print('ERROR: File logo.png not found.')
|
||||||
quit(1)
|
sys.exit(1)
|
||||||
splash.save(file_name)
|
splash.save(file_name)
|
||||||
|
|
||||||
print('...splash for {w}x{h} saved...'.format(w=device_w, h=device_h))
|
print('...splash for {w}x{h} saved...'.format(w=device_w, h=device_h))
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
black==20.8b1
|
black==20.8b1
|
||||||
flit==3.0.0
|
flit==3.0.0
|
||||||
pylint==2.7.1
|
pylint==2.7.1
|
||||||
|
tox==3.24.0
|
||||||
|
Loading…
Reference in New Issue
Block a user