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 DBF2A575705; Thu, 3 Aug 2023 17:34:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DBF2A575705 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691073248; bh=qLNRT7tXuS+7kL/UncGX6NxTFofbo98jOd8TaoMfxYc=; 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=QXff4GlAfPvzbytsvW9H9PIrzG6vfY/AoHsr1R4x6D8/76LmtiiOA9ev5Z9ZGZi5i dTnQo2O6I8J3l4Ht91pmsuZdKUllr/BVNzWHs2UkG9lOkaSE7AlgNeWZNGGkieKB7I OsqIwREECcW3V4wMgBZ7/w62c8pdm0ctbkxMIRJw= 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 AC8E2575705 for ; Thu, 3 Aug 2023 17:34:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AC8E2575705 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qRZOv-0000nw-Un; Thu, 03 Aug 2023 17:34:06 +0300 Message-ID: <7ee3c59c-905e-d29b-b6e4-b6ef682afbb0@tarantool.org> Date: Thu, 3 Aug 2023 17:34:05 +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: In-Reply-To: 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: 4F1203BC0FB41BD969E04B5EED670DC8BEB87106826C459512B2000DD660D84D182A05F5380850401D7AC9B2AB1178EAAE9A57572DF7D29C169C4C3C1B4D97B59C5445014ECE1745 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CE3A619BB4CB99268638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D820112B7E823470EC66E1F721A6A77B8F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B28585415E75ADA9E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0D75EB778CE7D8A0C68655334FD4449CB33AC447995A7AD1842539A7722CA490CD5E8D9A59859A8B60A9A04DE7321024275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5F1BFEF3B523FCE2902D8EBC60500CA085FC0FC5629D882A8F87CCE6106E1FC07E67D4AC08A07B9B065B78C30F681404DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF5ABCF2FBB46DD8DB3F3C9C4533877587D6289F98F85123CCA603D4B71DE31958D4FFD5EE53653998553022043D0BC9A1D49F64FC805F2A537FDF725B5033098E48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcir52QaMQ81bac8qdftPXA== X-DA7885C5: E92DB4089192034C4CBDBCB44CECF3ED4888F0D5CFA8804772DC52E7A8B7E20B262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986BC085775290FDE3BC7624EE216BCE9AC6DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 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: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 > # 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): > diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py > index 4787c62c..76fb3141 100644 > --- a/src/luajit_lldb.py > +++ b/src/luajit_lldb.py > @@ -453,15 +453,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_global(l), ( > + for coroutine in [L] + list(map(lambda main: lookup_global(main), ( > # 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 lua_State(l) > + if coroutine: > + return lua_State(coroutine) > > > def tou32(val): > @@ -1066,9 +1066,9 @@ coroutine guest stack: > If L is ommited the main coroutine is used. > ''' > def execute(self, debugger, args, result): > - l = self.parse(args) > - l_ptr = cast('lua_State *', l) if l is not None else None > - print('{}'.format(dump_stack(L(l_ptr)))) > + coro = self.parse(args) > + coro_ptr = cast('lua_State *', coro) if coro is not None else None > + print('{}'.format(dump_stack(L(coro_ptr)))) > > > def register_commands(debugger, commands):