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 6707057FBB4; Mon, 7 Aug 2023 14:14:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6707057FBB4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691406876; bh=S41B3rVT/CIGf7uCQlVX1fm4DiKWo8Laym9pNpNjsmI=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=J+TELmBm5akWZ819GvSAl4m+ZIeXaqT1xT2MLXgLRK4ktTRzPFiygR7CrKzIULoQR Guxe8EKYIBiwjGtN/2LH4Dm8CpwRNBG3YlE3sdRa6JClB5AKrwxtC37sZBgJ/SZhDx UGTjSp7OnFpHRdwF2LKUhzk1aujgVoVOc1ku4RWE= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [95.163.41.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9C0C957FBB4 for ; Mon, 7 Aug 2023 14:14:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9C0C957FBB4 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1qSyC1-008WGQ-1w; Mon, 07 Aug 2023 14:14:34 +0300 Date: Mon, 7 Aug 2023 11:00:44 +0000 To: Sergey Bronnikov Message-ID: References: <7ee3c59c-905e-d29b-b6e4-b6ef682afbb0@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7ee3c59c-905e-d29b-b6e4-b6ef682afbb0@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC86EE92E42F0C271DDC310B0E58918727B182A05F538085040D82C7AB68C0BDBE509A1049D6569D9A429C8DE0B7750731A162A5954C117EB2A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F65C230EDDCD559EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063779089FB2CE4EA2908638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E4AD371BA9940E874EEA3674CF0DB72E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209647ADFADE5905B1C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA9E45489B29CB19804D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3AD74539164518AE503F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637E6CFFF7AFAFA3B44EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5E81E544C9F8E0F46E4AE321E3CDC1CDE7478B1A17D57F5CCF87CCE6106E1FC07E67D4AC08A07B9B00A6B3CD6EB70C818BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF6276B7F558E199548655EEC74991104C3CABA8498BC32F9AEEE0613F6551BD9DA54F2CFF063EE8C06CFA265C340F28BAC035C6B2D6C5FA5FDEE7EA0CB6B39A12A74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj/xSHLV4ZQPutIbneNtJntQ== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D53140E6BD9DF9A50CA910FF30FAB67FDDEB3B91CD86D79B28BC2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 14/15] test: fix E741 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for your review! On 03.08.23, Sergey Bronnikov wrote: > Hi, Igor > > thanks for the patch! > > On 8/3/23 10:30, Igor Munkin wrote: > > Fixed 3 occurrences of E741 ("ambiguous variable name 'l'") error > > reported by pycodestyle[1]. > > > > [1]: https://www.flake8rules.com/rules/E741.html > > > > Signed-off-by: Igor Munkin > > --- > > src/luajit-gdb.py | 6 +++--- > > src/luajit_lldb.py | 12 ++++++------ > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py > > index a0c8f24e..2e0b145b 100644 > > --- a/src/luajit-gdb.py > > +++ b/src/luajit-gdb.py > > @@ -233,15 +233,15 @@ def L(L=None): > > # lookup a symbol for the main coroutine considering the host app > > # XXX Fragile: though the loop initialization looks like a crap but it > > # respects both Python 2 and Python 3. > > - for l in [L] + list(map(lambda l: lookup(l), ( > > + for coroutine in [L] + list(map(lambda main: lookup(main), ( > > it is not obvious why variable "l" was replaced by "coroutine". > > Could you elaborate? The same below It's quite clear (at least for me): lua_State represents Lua coroutine within low level space. However, I've already fixed it to "lstate" as Max suggested (you can find the incremental diff in my reply). > > > > # LuaJIT main coro (see luajit/src/luajit.c) > > 'globalL', > > # Tarantool main coro (see tarantool/src/lua/init.h) > > 'tarantool_L', > > # TODO: Add more > > ))): > > - if l: > > - return cast('lua_State *', l) > > + if coroutine: > > + return cast('lua_State *', coroutine) > > def G(L): -- Best regards, IM