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 57096575721; Thu, 3 Aug 2023 17:30:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 57096575721 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691073023; bh=zXCyj2HN8MrZf3u4C3Ycsc0E/0JuVQcQEYn39rexoIw=; 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=zv/1XKZzRpBXsggVf3cmT2FCRM++GX5tK1yTwbxBJlEoC+1aC/QCJQ5cddGVLdq3X X2Jqh/NUSltZHDps8esacrntFw/edeYlFiJ7mG5mofE47SIb8kcNt0Y6HJTjl8lz0F qncNPXK9ZrqfqZaRrY2hL2ZuVA5DN3eRG4XC+9G4= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 A38B1575711 for ; Thu, 3 Aug 2023 17:28:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A38B1575711 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qRZJv-0007J1-Mo; Thu, 03 Aug 2023 17:28:56 +0300 Message-ID: <18cf4858-3492-3f99-d279-31248b014263@tarantool.org> Date: Thu, 3 Aug 2023 17:28:55 +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: <8bbf5e3f00102d4e71f451c82de00bafe775518c.1691047132.git.imun@tarantool.org> In-Reply-To: <8bbf5e3f00102d4e71f451c82de00bafe775518c.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: 4F1203BC0FB41BD969E04B5EED670DC804E38A5F9341E5D89B81E0241E25E490182A05F5380850403C6F936AB7F502B8C197A734EA1792176EA387E8CE3CC064F251CE796384BD68 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8764B5BC580342EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DAE863916B47044D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D4A4815B22EEE57C87F274607FDFAA16117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520CCD848CCB6FE560C28451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8B60CDF180582EB8FBAAAE862A0553A39223F8577A6DFFEA7C8BDE37D78FCB031643847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A53D26BD7054D9BB781544CEDCE239389AD0375D5C65F4F02AF87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF2F4EEE9CD4370B3CFFB7CCA8A6B853C5B2EFE4591486A1ECDCEB6875B4E299CC24DE828755D94EE98553022043D0BC9AE89A996EE1A865A02A89FB70813209CDE48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcir52QaMQ81dHFWIGIwGtg== X-DA7885C5: 0F4BA9D4329D712F229B53702AD5CEAD55B34EA777B3AB1C9281B88328DB7ADC262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B8AA88ED6AEDC545C0E603683070675B7DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 10/15] test: fix E305 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 10 occurrences of E305 ("expected 2 blank lines after class or > function definition, found 1") error reported by pycodestyle[1]. > Furthermore, some other spots have been re-aligned the similar way to be > in sync with the default code style. > > [1]: https://www.flake8rules.com/rules/E305.html > > Signed-off-by: Igor Munkin > --- > src/luajit-gdb.py | 15 +++++++++++++++ > src/luajit_lldb.py | 10 ++++++++++ > 2 files changed, 25 insertions(+) > > diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py > index 9c51be0b..3babb1d5 100644 > --- a/src/luajit-gdb.py > +++ b/src/luajit-gdb.py > @@ -7,6 +7,7 @@ import sys > > # make script compatible with the ancient Python {{{ > > + > LEGACY = re.match(r'^2\.', sys.version) > > if LEGACY: > @@ -14,8 +15,10 @@ if LEGACY: > int = long > range = xrange > > + > # }}} > > + > gtype_cache = {} > > > @@ -70,8 +73,10 @@ def strx64(val): > return re.sub('L?$', '', > hex(int(cast('uint64_t', val) & 0xFFFFFFFFFFFFFFFF))) > > + > # Types {{{ > > + > LJ_T = { > 'NIL': i2notu32(0), > 'FALSE': i2notu32(1), > @@ -95,10 +100,12 @@ def typenames(value): > LJ_T[k]: 'LJ_T' + k for k in LJ_T.keys() > }.get(int(value), 'LJ_TINVALID') > > + > # }}} > > # Frames {{{ > > + > FRAME_TYPE = 0x3 > FRAME_P = 0x4 > FRAME_TYPEP = FRAME_TYPE | FRAME_P > @@ -175,10 +182,12 @@ def frame_prev(framelink): > def frame_sentinel(L): > return mref('TValue *', L['stack']) + LJ_FR2 > > + > # }}} > > # Const {{{ > > + > LJ_64 = None > LJ_GC64 = None > LJ_FR2 = None > @@ -194,6 +203,7 @@ LJ_LIGHTUD_BITS_LO = 47 - LJ_LIGHTUD_BITS_SEG > LIGHTUD_SEG_MASK = (1 << LJ_LIGHTUD_BITS_SEG) - 1 > LIGHTUD_LO_MASK = (1 << LJ_LIGHTUD_BITS_LO) - 1 > > + > # }}} > > > @@ -339,6 +349,7 @@ def gcringlen(root): > else: > return 1 + gclistlen(gcnext(root), gcref(root)) > > + > gclen = { > 'root': gclistlen, > 'gray': gclistlen, > @@ -374,6 +385,7 @@ def lightudV(tv): > else: > return gcval(tv['gcr']) > > + > # Dumpers {{{ > > > @@ -465,8 +477,10 @@ def dump_lj_tnumx(tv): > 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, > @@ -867,4 +881,5 @@ def load(event=None): > 'lj-gc': LJGC, > }) > > + > load(None) > diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py > index bdd9e716..325b40ec 100644 > --- a/src/luajit_lldb.py > +++ b/src/luajit_lldb.py > @@ -18,6 +18,8 @@ LJ_GCVMASK = ((1 << 47) - 1) > LJ_TISNUM = None > > # Debugger specific {{{ > + > + > # Global > target = None > > @@ -121,6 +123,7 @@ class Struct(metaclass=MetaStruct): > def addr(self): > return self.value.address_of > > + > c_structs = { > 'MRef': [ > (property(lambda self: self['ptr64'].unsigned if LJ_GC64 else self['ptr32'].unsigned), 'ptr') > @@ -212,9 +215,11 @@ c_structs = { > 'BCIns': [] > } > > + > for cls in c_structs.keys(): > globals()[cls] = type(cls, (Struct, ), {'metainfo': c_structs[cls]}) > > + > for cls in Struct.__subclasses__(): > ptr_name = cls.__name__ + 'Ptr' > > @@ -363,6 +368,7 @@ def dbg_eval(expr): > frame = thread.GetSelectedFrame() > return frame.EvaluateExpression(expr) > > + > # }}} Debugger specific > > > @@ -396,6 +402,7 @@ def gcringlen(root): > else: > return 1 + gclistlen(gcnext(root), gcref(root)) > > + > gclen = { > 'root': gclistlen, > 'gray': gclistlen, > @@ -630,6 +637,7 @@ def dump_lj_tnumx(tv): > 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, > @@ -647,6 +655,7 @@ dumpers = { > 'LJ_TNUMX': dump_lj_tnumx, > } > > + > LJ_T = { > 'NIL': i2notu32(0), > 'FALSE': i2notu32(1), > @@ -682,6 +691,7 @@ def typenames(value): > def dump_tvalue(tvptr): > return dumpers.get(typenames(itypemap(tvptr)), dump_lj_invalid)(tvptr) > > + > FRAME_TYPE = 0x3 > FRAME_P = 0x4 > FRAME_TYPEP = FRAME_TYPE | FRAME_P