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 BA1B3562813; Thu, 3 Aug 2023 10:50:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BA1B3562813 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691049056; bh=mCNbhJli7te00fbcT+CWMCs0JZoUs/b++iGrjv0GZtM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PFcdpKMrJ+OM6ESKy13JB0RtS99pTXpyiLHa/pFfoj1IQw23fPkEmVyFiqq9uSa7y 5ijITr5E19f4ueZRXTymvb5kYpnGvzdlMb5n8qOrYC4tO3VVK9jI06AGZuyBvd+IZK wZY0+NnA2zeEELUW0+raYfkDSU7JFqKzJPPHPISY= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [95.163.41.96]) (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 D0C69562377 for ; Thu, 3 Aug 2023 10:44:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D0C69562377 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1qRT0H-000EDQ-0y; Thu, 03 Aug 2023 10:44:13 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Thu, 3 Aug 2023 07:30:39 +0000 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD93761F2630DFFAF41CD8AADF74AB56123D62C7DACF73B16E5182A05F53808504082BCE501448844A238BF7337F593683A531469F40F6B2D1E5133FAF9374D14EA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F9D3BE5B596754B8C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7E8204D72912C702FEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA3F57DAE4DA5A92216A4CC023527623E3CC7F00164DA146DAFE8445B8C89999728AA50765F7900637BA939FD1B3BAB99B389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC85DA91C8160F4BAA0F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C89DDFE3E282F3DD16E0066C2D8992A164AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3177B6D997BF3D350BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CFED8438A78DFE0A9E1DD303D21008E298D5E8D9A59859A8B6957A4DEDD2346B4275ECD9A6C639B01B78DA827A17800CE7BEE702378D8A34C7731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A578599610FC06A74843F7D6B393291FE06A178B9A15A9CEF5F87CCE6106E1FC07E67D4AC08A07B9B04B3849D6E5CCBAFDC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF4D1CB56114A55F7E12A5982CE53698BA60A56F193ACC987710E4A6A8C64847F696309706696DB628553022043D0BC9A41684FECCE3D1AD6A9FB8571D3747406A74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcir52QaMQ83fj3flTIjHFA== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531C55F6AC43F6B0328B39E5592EEA72E2A931F1E698EF251A52326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [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" 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), ( # 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): -- 2.30.2