From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id E6F9E546E94; Thu, 3 Aug 2023 17:27:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E6F9E546E94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691072843; bh=1wYVFuMMxeaqchcHXnI/E5HhSp4eSigLpnbXXl98nUI=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Yn4RX3GOWimji2+nXdTxZ0ytPQMJU60cyl8j8+wwiEVtBz3XS5K0e0mRIWFgVqdEJ jFPTQMGcTjjvvNMDphZao0Y9HbS36dSudF6HrQFE4fflPoAmH26v/+ReU7W5VZ6mYH bMzXhzRJoiqjDfv3wBQEUkGx+dbFemMglag/mZoY= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 584F256C77C for ; Thu, 3 Aug 2023 17:26:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 584F256C77C Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1qRZHp-0003Bo-KG; Thu, 03 Aug 2023 17:26:46 +0300 Message-ID: <5a615911-f20c-5c30-3f6b-cb301c8849ae@tarantool.org> Date: Thu, 3 Aug 2023 17:26:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Igor Munkin , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <5a16585529e852321935087e631895722b3dc5b7.1691047132.git.imun@tarantool.org> In-Reply-To: <5a16585529e852321935087e631895722b3dc5b7.1691047132.git.imun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC804E38A5F9341E5D89B81E0241E25E490182A05F538085040BFF4DF8DD2AED95711F7BB367EAA2AD47D8919BC737F4049CC20620F45BBB001 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78887611F2F2455C9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C8DFB935205A313D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81B1A0DF1CD079001BAA8BBD704870F81117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF80095D1E57F4578A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520CCD848CCB6FE560C28451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0D75EB778CE7D8A0C68655334FD4449CB33AC447995A7AD18CE5475246E174218D5E8D9A59859A8B6045A9A90E9EED90B089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5D88EE1B81910250A157441BC7E71CDF1E48E0A8687B08409F87CCE6106E1FC07E67D4AC08A07B9B0B355ED1E20F5346ACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFD860E1B887362CC167EC35CD509BF13DB263801D238FADBA6043AEDD8D92DC539DCE6E1EBC7C769E8553022043D0BC9AB73D99C4CDFD21A8011381A757BF52F9E48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcir52QaMQ80H4uMcGE16Ig== X-DA7885C5: 55144C11802333B6B8DC98D8FA2D58329FEB6D10B16B0DC501BD76237753E7F3262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B8EC22897D0786DFBC1862F7B8731CD12DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 04/15] test: fix E203 errors by pycodestyle X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" LGTM On 8/3/23 10:30, Igor Munkin wrote: > Fixed 36 occurrences of E203 ("whitespace before ':'") error reported > by pycodestyle[1]. Furthermore, many other parts have been re-aligned > the similar way to be in sync with the default code style. > > [1]: https://www.flake8rules.com/rules/E203.html > > Signed-off-by: Igor Munkin > --- > src/luajit-gdb.py | 98 +++++++++++++++++++++---------------------- > src/luajit_lldb.py | 102 ++++++++++++++++++++++----------------------- > 2 files changed, 100 insertions(+), 100 deletions(-) > > diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py > index 198578b1..09899f58 100644 > --- a/src/luajit-gdb.py > +++ b/src/luajit-gdb.py > @@ -65,20 +65,20 @@ def strx64(val): > # Types {{{ > > LJ_T = { > - 'NIL' : i2notu32(0), > - 'FALSE' : i2notu32(1), > - 'TRUE' : i2notu32(2), > - 'LIGHTUD' : i2notu32(3), > - 'STR' : i2notu32(4), > - 'UPVAL' : i2notu32(5), > - 'THREAD' : i2notu32(6), > - 'PROTO' : i2notu32(7), > - 'FUNC' : i2notu32(8), > - 'TRACE' : i2notu32(9), > - 'CDATA' : i2notu32(10), > - 'TAB' : i2notu32(11), > - 'UDATA' : i2notu32(12), > - 'NUMX' : i2notu32(13), > + 'NIL': i2notu32(0), > + 'FALSE': i2notu32(1), > + 'TRUE': i2notu32(2), > + 'LIGHTUD': i2notu32(3), > + 'STR': i2notu32(4), > + 'UPVAL': i2notu32(5), > + 'THREAD': i2notu32(6), > + 'PROTO': i2notu32(7), > + 'FUNC': i2notu32(8), > + 'TRACE': i2notu32(9), > + 'CDATA': i2notu32(10), > + 'TAB': i2notu32(11), > + 'UDATA': i2notu32(12), > + 'NUMX': i2notu32(13), > } > > def typenames(value): > @@ -95,22 +95,22 @@ FRAME_P = 0x4 > FRAME_TYPEP = FRAME_TYPE | FRAME_P > > FRAME = { > - 'LUA': 0x0, > - 'C': 0x1, > - 'CONT': 0x2, > - 'VARG': 0x3, > - 'LUAP': 0x4, > - 'CP': 0x5, > - 'PCALL': 0x6, > + 'LUA': 0x0, > + 'C': 0x1, > + 'CONT': 0x2, > + 'VARG': 0x3, > + 'LUAP': 0x4, > + 'CP': 0x5, > + 'PCALL': 0x6, > 'PCALLH': 0x7, > } > > def frametypes(ft): > return { > - FRAME['LUA'] : 'L', > - FRAME['C'] : 'C', > - FRAME['CONT'] : 'M', > - FRAME['VARG'] : 'V', > + FRAME['LUA']: 'L', > + FRAME['C']: 'C', > + FRAME['CONT']: 'M', > + FRAME['VARG']: 'V', > }.get(ft, '?') > > def bc_a(ins): > @@ -299,12 +299,12 @@ def gcringlen(root): > return 1 + gclistlen(gcnext(root), gcref(root)) > > gclen = { > - 'root': gclistlen, > - 'gray': gclistlen, > + 'root': gclistlen, > + 'gray': gclistlen, > 'grayagain': gclistlen, > - 'weak': gclistlen, > + 'weak': gclistlen, > # XXX: gc.mmudata is a ring-list. > - 'mmudata': gcringlen, > + 'mmudata': gcringlen, > } > > # The generator that implements frame iterator. > @@ -410,20 +410,20 @@ def dump_lj_invalid(tv): > # }}} > > dumpers = { > - 'LJ_TNIL': dump_lj_tnil, > - 'LJ_TFALSE': dump_lj_tfalse, > - 'LJ_TTRUE': dump_lj_ttrue, > + 'LJ_TNIL': dump_lj_tnil, > + 'LJ_TFALSE': dump_lj_tfalse, > + 'LJ_TTRUE': dump_lj_ttrue, > 'LJ_TLIGHTUD': dump_lj_tlightud, > - 'LJ_TSTR': dump_lj_tstr, > - 'LJ_TUPVAL': dump_lj_tupval, > - 'LJ_TTHREAD': dump_lj_tthread, > - 'LJ_TPROTO': dump_lj_tproto, > - 'LJ_TFUNC': dump_lj_tfunc, > - 'LJ_TTRACE': dump_lj_ttrace, > - 'LJ_TCDATA': dump_lj_tcdata, > - 'LJ_TTAB': dump_lj_ttab, > - 'LJ_TUDATA': dump_lj_tudata, > - 'LJ_TNUMX': dump_lj_tnumx, > + 'LJ_TSTR': dump_lj_tstr, > + 'LJ_TUPVAL': dump_lj_tupval, > + 'LJ_TTHREAD': dump_lj_tthread, > + 'LJ_TPROTO': dump_lj_tproto, > + 'LJ_TFUNC': dump_lj_tfunc, > + 'LJ_TTRACE': dump_lj_ttrace, > + 'LJ_TCDATA': dump_lj_tcdata, > + 'LJ_TTAB': dump_lj_ttab, > + 'LJ_TUDATA': dump_lj_tudata, > + 'LJ_TNUMX': dump_lj_tnumx, > } > > def dump_tvalue(tvalue): > @@ -695,8 +695,8 @@ The command requires no args and dumps current VM and GC states > g = G(L(None)) > gdb.write('{}\n'.format('\n'.join( > map(lambda t: '{} state: {}'.format(*t), { > - 'VM': vm_state(g), > - 'GC': gc_state(g), > + 'VM': vm_state(g), > + 'GC': gc_state(g), > 'JIT': jit_state(g), > }.items()) > ))) > @@ -785,13 +785,13 @@ def init(commands): > > def load(event=None): > init({ > - 'lj-arch': LJDumpArch, > - 'lj-tv': LJDumpTValue, > - 'lj-str': LJDumpString, > - 'lj-tab': LJDumpTable, > + 'lj-arch': LJDumpArch, > + 'lj-tv': LJDumpTValue, > + 'lj-str': LJDumpString, > + 'lj-tab': LJDumpTable, > 'lj-stack': LJDumpStack, > 'lj-state': LJState, > - 'lj-gc': LJGC, > + 'lj-gc': LJGC, > }) > > load(None) > diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py > index 2887723b..b9c8a0b9 100644 > --- a/src/luajit_lldb.py > +++ b/src/luajit_lldb.py > @@ -88,8 +88,8 @@ class MetaStruct(type): > > def make_general(field, tp): > builtin = { > - 'uint': 'unsigned', > - 'int': 'signed', > + 'uint': 'unsigned', > + 'int': 'signed', > 'string': 'value', > } > if tp in builtin.keys(): > @@ -380,12 +380,12 @@ def gcringlen(root): > return 1 + gclistlen(gcnext(root), gcref(root)) > > gclen = { > - 'root': gclistlen, > - 'gray': gclistlen, > + 'root': gclistlen, > + 'gray': gclistlen, > 'grayagain': gclistlen, > - 'weak': gclistlen, > + 'weak': gclistlen, > # XXX: gc.mmudata is a ring-list. > - 'mmudata': gcringlen, > + 'mmudata': gcringlen, > } > > def dump_gc(g): > @@ -582,37 +582,37 @@ def dump_lj_invalid(tv): > return 'not valid type @ {}'.format(strx64(gcval(tv.gcr))) > > dumpers = { > - 'LJ_TNIL': dump_lj_tnil, > - 'LJ_TFALSE': dump_lj_tfalse, > - 'LJ_TTRUE': dump_lj_ttrue, > + 'LJ_TNIL': dump_lj_tnil, > + 'LJ_TFALSE': dump_lj_tfalse, > + 'LJ_TTRUE': dump_lj_ttrue, > 'LJ_TLIGHTUD': dump_lj_tlightud, > - 'LJ_TSTR': dump_lj_tstr, > - 'LJ_TUPVAL': dump_lj_tupval, > - 'LJ_TTHREAD': dump_lj_tthread, > - 'LJ_TPROTO': dump_lj_tproto, > - 'LJ_TFUNC': dump_lj_tfunc, > - 'LJ_TTRACE': dump_lj_ttrace, > - 'LJ_TCDATA': dump_lj_tcdata, > - 'LJ_TTAB': dump_lj_ttab, > - 'LJ_TUDATA': dump_lj_tudata, > - 'LJ_TNUMX': dump_lj_tnumx, > + 'LJ_TSTR': dump_lj_tstr, > + 'LJ_TUPVAL': dump_lj_tupval, > + 'LJ_TTHREAD': dump_lj_tthread, > + 'LJ_TPROTO': dump_lj_tproto, > + 'LJ_TFUNC': dump_lj_tfunc, > + 'LJ_TTRACE': dump_lj_ttrace, > + 'LJ_TCDATA': dump_lj_tcdata, > + 'LJ_TTAB': dump_lj_ttab, > + 'LJ_TUDATA': dump_lj_tudata, > + 'LJ_TNUMX': dump_lj_tnumx, > } > > LJ_T = { > - 'NIL' : i2notu32(0), > - 'FALSE' : i2notu32(1), > - 'TRUE' : i2notu32(2), > - 'LIGHTUD' : i2notu32(3), > - 'STR' : i2notu32(4), > - 'UPVAL' : i2notu32(5), > - 'THREAD' : i2notu32(6), > - 'PROTO' : i2notu32(7), > - 'FUNC' : i2notu32(8), > - 'TRACE' : i2notu32(9), > - 'CDATA' : i2notu32(10), > - 'TAB' : i2notu32(11), > - 'UDATA' : i2notu32(12), > - 'NUMX' : i2notu32(13), > + 'NIL': i2notu32(0), > + 'FALSE': i2notu32(1), > + 'TRUE': i2notu32(2), > + 'LIGHTUD': i2notu32(3), > + 'STR': i2notu32(4), > + 'UPVAL': i2notu32(5), > + 'THREAD': i2notu32(6), > + 'PROTO': i2notu32(7), > + 'FUNC': i2notu32(8), > + 'TRACE': i2notu32(9), > + 'CDATA': i2notu32(10), > + 'TAB': i2notu32(11), > + 'UDATA': i2notu32(12), > + 'NUMX': i2notu32(13), > } > > def itypemap(o): > @@ -635,22 +635,22 @@ FRAME_P = 0x4 > FRAME_TYPEP = FRAME_TYPE | FRAME_P > > FRAME = { > - 'LUA': 0x0, > - 'C': 0x1, > - 'CONT': 0x2, > - 'VARG': 0x3, > - 'LUAP': 0x4, > - 'CP': 0x5, > - 'PCALL': 0x6, > + 'LUA': 0x0, > + 'C': 0x1, > + 'CONT': 0x2, > + 'VARG': 0x3, > + 'LUAP': 0x4, > + 'CP': 0x5, > + 'PCALL': 0x6, > 'PCALLH': 0x7, > } > > def frametypes(ft): > return { > - FRAME['LUA'] : 'L', > - FRAME['C'] : 'C', > - FRAME['CONT'] : 'M', > - FRAME['VARG'] : 'V', > + FRAME['LUA']: 'L', > + FRAME['C']: 'C', > + FRAME['CONT']: 'M', > + FRAME['VARG']: 'V', > }.get(ft, '?') > > def bc_a(ins): > @@ -838,8 +838,8 @@ The command requires no args and dumps current VM and GC states > g = G(L(None)) > print('{}'.format('\n'.join( > map(lambda t: '{} state: {}'.format(*t), { > - 'VM': vm_state(g), > - 'GC': gc_state(g), > + 'VM': vm_state(g), > + 'GC': gc_state(g), > 'JIT': jit_state(g), > }.items()) > ))) > @@ -1024,12 +1024,12 @@ def configure(debugger): > def __lldb_init_module(debugger, internal_dict): > configure(debugger) > register_commands(debugger, { > - 'lj-tv': LJDumpTValue, > + 'lj-tv': LJDumpTValue, > 'lj-state': LJState, > - 'lj-arch': LJDumpArch, > - 'lj-gc': LJGC, > - 'lj-str': LJDumpString, > - 'lj-tab': LJDumpTable, > + 'lj-arch': LJDumpArch, > + 'lj-gc': LJGC, > + 'lj-str': LJDumpString, > + 'lj-tab': LJDumpTable, > 'lj-stack': LJDumpStack, > }) > print('luajit_lldb.py is successfully loaded')