PKT|I$00!friendlyautopep8/.__init__.py.swpb0VIM 8.0nXX"bussonniermatthiasMatthiass-MacBook-Pro.local~bussonniermatthias/dev/friendlyautopep8/friendlyautopep8/__init__.pyutf-8 3210#"! UtpEadE}|fedc5Q#" v ]  u 0  w F , p o n Y J 9 ! n m 1 VH8 subprocess.run('a subprocess.run subprocess.run subprocess.run('aut subp subprocess.run('autopep8 --in-place --line-range'.split()+[str(start),str(sto subprocess.run('auto subprocess.r subprocess.run('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)]) print(' '.join('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)])) for start,stop in linespairs[::-1]: continue if not fname.endswith('.py'): for fname, linespairs in find_files_and_lines(old=old):def run_on_cwd(old=None): run_on_cwd() else: run_on_cwd(argv[1]) if len(argv) == 2: raise ValueError('too many arguments') if len(argv) > 2: argv = sys.argv if not argv: import sysdef main(argv=None): yield file_, chunks raise ValueError('ubknown', atline) else: chunks.append((start, start+delta-1)) beginning, end = (start, start+delta-1) continue print('skip only deleted lines') if delta == 0: start, delta = int(after), 1 else: start, delta = [int(_) for _ in after.split(',')] if ',' in after: before, after = atline.split('@@')[1].strip().split(' ') elif atline.startswith('@@'): chunks = [] file_ = atline[5:] yield file_, chunks if file_ is not None: if(atline.startswith('+++ b') or atline == '+++ /dev/null'): for atline in lines: chunks = [] file_ = None lines = [l for l in p.stdout.decode().splitlines() if l.startswith(('+++','@@'))] p = subprocess.run(subp, stdout=subprocess.PIPE) subp = 'git diff -U0'.split(' ') + target raise ValueError('no clue how to do new only') elif new: target = [str(old)] elif old: target = ['{old}..{new}'.format(old=old, new=new)] if old and new: target = [] import subprocessdef find_files_and_lines(old=None, new=None):__version__ = '0.0.3'import subprocess"""yet) lines of your files.Just a wrapper around autopep8 which run _only_ on the changed (non commited"""PKO|I}!friendlyautopep8/.__init__.py.un~VimUnDoNuoLwDrU<0 8~TvqEXXn)_ XX (__version__ = '0.0.1'5_,XX\ (, start, delta = int(after), 15_  /v/XX\ ) beginning, end =  )5_3  /v/XX\")3 beginning, end = (start, start+delta-1)5_!""/v/XX\ "+ "Wrong 5_!""/v/XX\ "+ print("Wrong 5_!>""/v/XX\ "+L print("Wrong ordering, got", beginning, end, "Extracted from5_ !L""/v/XX\ "+L print("Wrong ordering, got", beginning, end, "extracted from5_ !U v XX\ "+W print("Wrong ordering, got", beginning, end, "extracted from", atlines)5_ !U v XX]6 "+V print("Wrong ordering, got", beginning, end, "extracted from", atline)5_ % % % v XX]=+ file = atline[5:]+" yield file, chunks+ if file is not None:+ file = None$&+ yield file, chunks5_ , vXX]x!+, start, delta = int(after), 15_   vXX]!- if delta == 0:5_   vXX]!. print(''5_ / vXX]!./ print('skip only deleted lines'5_# vXX]"$. if end <= beginning:5_  vXXi  .def find_files_and_lines():5_  vXXi J=`=jedi=0, =`= (old) =`=jedi=`=5_  vXXi .#def find_files_and_lines(old, new):5_ & vXXi U=`=jedi=0, =`= (*_*old*_*, new) =`=jedi=`=5_ & vXXi Z=`=jedi=0, =`= (*_*old=None*_*, new) =`=jedi=`= .(def find_files_and_lines(old=None, new):5_ ( vXXi .-def find_files_and_lines(old=None, new=NOne):5_ - vXXi  .-def find_files_and_lines(old=None, new=None):5_ vXXjV  this is new5_ vXXj^ . import subprocess5_ vXXjt1 if old or new:5_  vXXjz2 if old or new:5_ vXXj} if o5_ vXXj1 target=''5_ vXXj1 target='{}'5_  vXXj1 target='{old}'5_!  vXXj1 target='{old}..{}'5_ "! vXXj1 target='{old}..{new}'5_!#" vXXj3 target='{old}..{new}'5_"$#% vXXj if old and new:5_#%$% vXXjS if old and new:=`=jedi=0, =`= (*_*self*_*, *args, **kwargs) =`=jedi=`=3& target='{old}..{new}'.format()5_$&%' vXXj S if old and new:=`=jedi=0, =`= (*_*self*_*, *args, **kwargs) =`=jedi=`=3( target='{old}..{new}'.format('')5_%'& vXXj 3 target = 5_&(' vXXj3 target = str(old)5_')( vXXj5 raise ValueError()5_(*) vXXj  elif new:5 raise ValueError('')5_)+*0 vXXj5I p = subprocess.run('git diff -U0'.split(' '), stdout=subprocess.PIPE)5_*,+2 vXXj 5L p = subprocess.run('git diff -U0'.split(' ')+[], stdout=subprocess.PIPE)5_+-,1 vXXj055def run_on_cwd():5_,.-3 vXXk248 args = sys.argv5_-/.3 vXXk24 argv = sys.argv258 argv = sys.argv5_.0/4 vXXk359 if len(argv) > 5_/104 vXXk359 if len(argv) > 5_0213 vXXk35 if len(argv) > 3:269 argv = sys.argv5_1322  vXXk512 import sys argv = sys.argv if len(argv) > 3: raise ValueError() if len(argv) > 25_2431 vXXk70661265_354/ vXXk9.2; yield file_, chunks5_4652 vXXk=125_5765 vXXk@35 if len(argv) > 3:5_6875 vXXk@46< raise ValueError()5_7985 vXXkA35F if len(argv) =`=jedi=0, > 3:=`= (*_*of correct type*_*) =`=jedi=`=46< raise ValueError('')5_8:94 vXXkJ35< if len(argv) > 3:5_9;:6 vXXkL57< if len(argv) > 25_:<;6 vXXkN58< if len(argv) == 25_;=<8 vXXkR685_<>=8 vXXkS683=`=jedi=0, =`= () =`=jedi=`=79=def run_on_cwd():5_=?>6 vXXkb58= if len(argv) == 2:5_>@?1 vXXkl02> import main()5_?A@1  vXXkp02> def main()5_@BA1 vXXkr02>def main(argv=NOne)5_ACB2 vXXk{14> import sys5_BDC4 vXXk~35? argv = sys.argv5_CED8 vXXk79? run_on_cwd(old)5_DFE8 vXXk7;? run_on_cwd(argv[1])5_EGF9 vXXk9;A9:A5_FHG: vXXk9;B run_on_cwd(argv[1])5_GIH1 vXXk02Bdef main(argv=None)5_HJI= vXXk;=<>Bdef run_on_cwd(old):5_IKJ?2 vXXk=?5_JLK?2 vXXk=?d=`=jedi=0, =`= (*_*old=None*_*, new=None) =`=jedi=`=>@B4 for fname, linespairs in find_files_and_lines():5_KML  vXXlB target = ''5_LNM vXXlB target = [''5_MON vXXlB target = ['']5_NPO vXXl B6 target='{old}..{new}'.format(old=old, new=new)5_OQP7 vXXl B7 target=['{old}..{new}'.format(old=old, new=new)5_PRQvXXlB target = str(old)5_QSRvXXlB target = [str(old)5_RTS1vXXlBR p = subprocess.run('git diff -U0'.split(' ')+[target], stdout=subprocess.PIPE)5_SUT7vXXlBQ p = subprocess.run('git diff -U0'.split(' ')+target], stdout=subprocess.PIPE)5_TVUvXXl"B"""LJust a wrapper around autopep8 which run _only_ on the changed (non commitedyet) lines of your files."""import subprocess__version__ = '0.0.2'-def find_files_and_lines(old=None, new=None): import subprocess target = [] if old and new:8 target=['{old}..{new}'.format(old=old, new=new)] elif old: target = [str(old)] elif new:6 raise ValueError('no clue how to do new only')P p = subprocess.run('git diff -U0'.split(' ')+target, stdout=subprocess.PIPE)U lines = [l for l in p.stdout.decode().splitlines() if l.startswith(('+++','@@'))] file_ = None chunks = [] for atline in lines:' if(atline.startswith('+++ b')):! if file_ is not None:# yield file_, chunks file_ = atline[5:] chunks = []% elif atline.startswith('@@'):D before, after = atline.split('@@')[1].strip().split(' ') if ',' in after:A start, delta = [int(_) for _ in after.split(',')] else:, start, delta = int(after), 1 if delta == 0:0 print('skip only deleted lines') continue 3 beginning, end = (start, start+delta-1) if end < beginning:X print("Wrong ordering, got", beginning, end, "extracted from", atline, )1 chunks.append((start, start+delta-1)) else:/ raise ValueError('ubknown', atline) yield file_, chunksdef main(argv=None): import sys if not argv: argv = sys.argv if len(argv) > 2:. raise ValueError('too many arguments') if len(argv) == 2: run_on_cwd(argv[1]) else: run_on_cwd()def run_on_cwd(old=None):; for fname, linespairs in find_files_and_lines(old=old):+ for start,stop in linespairs[::-1]:s print(' '.join('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)]))r subprocess.run('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)])5_UWV6vXXlvE subp = ED6 raise ValueError('no clue how to do new only')5_VXWvXXl~E0 p = subprocess.run(, stdout=subprocess.PIPE)F2 p = subprocess.run('git diff -U0'.split(' ') +6 target, stdout=subprocess.PIPE)5_WYX3vXXlE target5_XZY3vXXlF& subp = 'git diff -U0'.split(' ') + target5_Y[Z-3vXXlE- subp = 'git diff -U0'.split(' ') + target5_Z\[3vXXlFF5_[]\3vXXlG print(subp)5_\^]3vXXlG print(subp)5_]_^3vXXlG print('')5_^`_ 3vXXlGG5__a`3vXXlH print('old and new')5_`ba3vXXlH print('ld and new')5_acb3vXXlH print('d and new')5_bdc3vXXlH print(' and new')5_ced3vXXlH print('and new')5_dfe3vXXlH print('nd new')5_egf3vXXlH print('d new')5_fhg3vXXlH print(' new')5_gih3vXXlH print('new')5_hji3vXXlH print('ew')5_ikj3vXXlH print('w')5_jlk3vXXlI H5_kml3vXXl ld only5_lnm3vXXlH print('')5_mon 3vXXlHH5_npo3vXXl ld only5_oqp 3vXXl H elif new:5_prq63vXXlI6 raise ValueError('no clue how to do new only')5_qsr3vXXlK print(''5_rts3vXXl!K print('no new no old'5_sut=3vXXl#<?K argv = sys.argv5_tvu413vXXmw36L1 chunks.append((start, start+delta-1))5_uwv53vXXm45 else5_vxw#%3vXXm"$L' if(atline.startswith('+++ b')):5_wyx#43vXXm%"$L7 if(atline.startswith('+++ b') or atline == ''):5_xzyI;3vXXn!HKL; for fname, linespairs in find_files_and_lines(old=old):5_y{zJ 3vXXn'IKM if fname.5_z|{J3vXXn(IKM if not fname.5_{}|J3vXXn+IKM if not fname.endswith()5_|~}J3vXXn,IKM! if not fname.endswith('')5_}~J$3vXXn/&ILM$ if not fname.endswith('.py')5_~ 3vXXnJ' N__version__ = '0.0.2'5_3vXXnj print('old and new')5_3vXXnk print('old only')5_3vXXnk print('new only')5_3vXXnl print('no new no old')5_3vXXnm print(subp)5_.3vXXnr-.X print("Wrong ordering, got", beginning, end, "extracted from", atline, )5_- 3vXXns,- if end < beginning:5_73vXXnt(67 print('argv', argv)5_3vXXn) else:5PKzI)00!friendlyautopep8/.__main__.py.swpb0VIM 8.0kXX"bussonniermatthiasMatthiass-MacBook-Pro.local~bussonniermatthias/dev/friendlyautopep8/friendlyautopep8/__main__.pyutf-8 3210#"! Utpadmain(sys.argv)import sysfrom . import mainPKzIV+BB!friendlyautopep8/.__main__.py.un~VimUnDo*!3MtNYkC,_k>F6ao main()XXk_XXkfrom . import run_on_cwd5_XXk run_on_cwd()5_XXkfrom . import main5_XXkmain()5PKP|Ifriendlyautopep8/__init__.py""" Just a wrapper around autopep8 which run _only_ on the changed (non commited yet) lines of your files. """ import subprocess __version__ = '0.0.3' def find_files_and_lines(old=None, new=None): import subprocess target = [] if old and new: target = ['{old}..{new}'.format(old=old, new=new)] elif old: target = [str(old)] elif new: raise ValueError('no clue how to do new only') subp = 'git diff -U0'.split(' ') + target p = subprocess.run(subp, stdout=subprocess.PIPE) lines = [l for l in p.stdout.decode().splitlines() if l.startswith(('+++','@@'))] file_ = None chunks = [] for atline in lines: if(atline.startswith('+++ b') or atline == '+++ /dev/null'): if file_ is not None: yield file_, chunks file_ = atline[5:] chunks = [] elif atline.startswith('@@'): before, after = atline.split('@@')[1].strip().split(' ') if ',' in after: start, delta = [int(_) for _ in after.split(',')] else: start, delta = int(after), 1 if delta == 0: print('skip only deleted lines') continue beginning, end = (start, start+delta-1) chunks.append((start, start+delta-1)) else: raise ValueError('ubknown', atline) yield file_, chunks def main(argv=None): import sys if not argv: argv = sys.argv if len(argv) > 2: raise ValueError('too many arguments') if len(argv) == 2: run_on_cwd(argv[1]) else: run_on_cwd() def run_on_cwd(old=None): for fname, linespairs in find_files_and_lines(old=old): if not fname.endswith('.py'): continue for start,stop in linespairs[::-1]: print(' '.join('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)])) subprocess.run('autopep8 --in-place --line-range'.split()+[str(start),str(stop), '.{}'.format(fname)]) PK'|IvpP--friendlyautopep8/__main__.pyfrom . import main import sys main(sys.argv) PK!H7b0<1friendlyautopep8-0.0.3.dist-info/entry_points.txtN+I/N.,()J+LKɩL,-/H-PU@MPK!H;@QP&friendlyautopep8-0.0.3.dist-info/WHEEL1 0 RZq+D-Dv;_[*7Fp ܦpv/fݞoL(*IPK!HYX)friendlyautopep8-0.0.3.dist-info/METADATAU]o6}篸(\ K;cH)v6 6%][l$R%)+zoߡl+Y},^ޯsϹf/se[Nh8U󲓍75bx"~OmSUv 8OZ+-IkލBeF[ z94.2SUs..MQ-(vxVhOgZImoT\_еPiZ"*JC{:XBB;je_LY)S+$KMIB7W4kk6 WHdG_w<\|y} _Wq1T*.WE?FZKJٷۙyL)"O/;1Mp ah" G3$OHϏI"|`ݩz;璇{ې;Rf%:'/J+Xum&H ]^?Oߘ~>FZ8(tWٿ#D49uOm+k>jc} Dڼ9 +.FPtjOSd Mnj"=- Ģ*,O= mƝi|r Z]EfL_.4.պ-@߈rNCA#c7J8Ȳ(R;1I CZb!ŽrZjy/-cm Fq CDhLYA\s( Fr]a2+r 0J> [ABbkadTm ݪ$tkZ]>2 |@4TF#{b1vC޾R*!+bam s8Iرpg@oo=mS|Em,s2#G#D7 FhMR͛*\d@W΂8 0T\O5LABfدzPK!H-Ed'friendlyautopep8-0.0.3.dist-info/RECORDr@}\dB@ h&.g6Τ*V27|o+.H^uS4$`$BÄnh@Q_Dlumu<ٔw`_F Ohvn;N@ןtO~x?wu85P:b0݉S J+y՜ xHW)&_E[`/ aZHv4mEp$G)nT s<GGk:9IWȟqG٦- x%t?VRs1d ɋ(LwW45&H;NFukV_51wT²;~ϪmSI JH;y_͖DҺ9 fiW_[7W^$8r~3+c'?2 5L{ PKT|I$00!friendlyautopep8/.__init__.py.swpPKO|I}!?0friendlyautopep8/.__init__.py.un~PKzI)00!N/friendlyautopep8/.__main__.py.swpPKzIV+BB!_friendlyautopep8/.__main__.py.un~PKP|Igfriendlyautopep8/__init__.pyPK'|IvpP--eofriendlyautopep8/__main__.pyPK!H7b0<1ofriendlyautopep8-0.0.3.dist-info/entry_points.txtPK!H;@QP&Kpfriendlyautopep8-0.0.3.dist-info/WHEELPK!HYX)pfriendlyautopep8-0.0.3.dist-info/METADATAPK!H-Ed'tfriendlyautopep8-0.0.3.dist-info/RECORDPK /w