comparison tasks.py @ 1873:f001d689b3e2

more py3 and typing fixes Ignore-this: 3180bd966cac69de56b86ef6a308cad4
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 27 May 2019 06:20:38 +0000
parents 375f48d1518a
children 17bee25a20cb
comparison
equal deleted inserted replaced
1872:5ebdb55e2ee6 1873:f001d689b3e2
28 def pkg_sources(): 28 def pkg_sources():
29 return glob.glob('light9/**/*.py', recursive=True) 29 return glob.glob('light9/**/*.py', recursive=True)
30 30
31 @task 31 @task
32 def mypy(ctx): 32 def mypy(ctx):
33 print('\n\n')
33 def run(sources): 34 def run(sources):
34 ss = ' '.join(sources) 35 ss = ' '.join(sources)
35 ctx.run(f'MYPYPATH=stubs env/bin/mypy --check-untyped-defs {ss}', 36 ctx.run(f'MYPYPATH=stubs:/my/proj/rdfdb env/bin/mypy --check-untyped-defs {ss}',
36 pty=True, warn=True) 37 pty=True, warn=True)
37 38
38 sources = ' '.join(bin_sources + pkg_sources()) 39 sources = ' '.join(bin_sources + pkg_sources())
39 ctx.run(f'env/bin/flake8 --ignore=E115,E123,E124,E126,E225,E231,E261,E262,E265,E301,E302,E303,E305,E306,E401,E402,E501,E701,E731,W291,W293,W391,W504 {sources}', warn=True) 40 ctx.run(f'env/bin/flake8 --ignore=E115,E123,E124,E126,E225,E231,E261,E262,E265,E301,E302,E303,E305,E306,E401,E402,E501,E701,E731,W291,W293,W391,W504 {sources}', warn=True)
40 41
41 sources = ' '.join(pkg_sources()) 42 sources = ' '.join(pkg_sources())
42 for src in bin_sources: 43 run(['bin/rdfdb'])
43 print(f"mypy {src}") 44 run(['bin/keyboardcomposer'])
44 run([src])# + pkg_sources()) 45 #for src in bin_sources:
46 # print(f"mypy {src}")
47 # run([src])# + pkg_sources())
45 @task 48 @task
46 def reformat(ctx): 49 def reformat(ctx):
47 ctx.run("env/bin/yapf --verbose --parallel --in-place --style google light9/**/*.py `file --no-pad bin/* | grep 'Python script' | perl -lpe 's/:.*//'`") 50 ctx.run("env/bin/yapf --verbose --parallel --in-place --style google light9/**/*.py `file --no-pad bin/* | grep 'Python script' | perl -lpe 's/:.*//'`")
48 51
49 @task 52 @task