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 B6C58138419B; Wed, 14 May 2025 13:51:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B6C58138419B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1747219878; bh=CXYxfO1Ndf/fTblgE9XiR4D0Dn8tRFdA+uL0oJntQgA=; 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=FS7p0Meo5PH/v7XBUYGExEpekp/8vhySDFjac/2OcvqFIAdcFNH51SbOU/IFw4YnL +0XrKPb6rmePJgsvCAaziw62ShyapS99t9kUF6mo+youZqFmLvZoavlyXA6pz9fUB4 pVCrzz08HFVEd14wWqdRdqU6FIckIEd2+ZUwuiq0= Received: from send81.i.mail.ru (send81.i.mail.ru [89.221.237.176]) (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 A16A3138419D for ; Wed, 14 May 2025 13:51:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A16A3138419D Received: by exim-smtp-6c9b7b7598-s92tj with esmtpa (envelope-from ) id 1uF9hk-000000007ZP-2NMK; Wed, 14 May 2025 13:51:17 +0300 Content-Type: multipart/alternative; boundary="------------ajyOv2bNWhpvOGEcVealfCQW" Message-ID: <41102af3-b16e-42cf-a6dc-5ab51cbc67b9@tarantool.org> Date: Wed, 14 May 2025 13:51:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <20250514093826.31470-1-skaplun@tarantool.org> In-Reply-To: <20250514093826.31470-1-skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD93761F2630DFFAF41DADE37F0BB826AF728399E8040BAFFF2182A05F5380850404C228DA9ACA6FE27E94357478F441B863DE06ABAFEAF67053580E117A9C21443A634690B2A101977F469BABF12523199 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637ECAF4C2CEE0D0B2F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B26B339CB01C1FF6C22E070BE324C7D3C417922B4D782E93EBF6B57BC7E64490618DEB871D839B73339E8FC8737B5C224952D31B9D28593E51CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0B27420F9988F54058941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0C3023615F15EFAF17B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F9647ADFADE5905B18F49F126DDB898E8B3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B8448547D3729B47F75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5B58C1141511234955002B1117B3ED696EEE18E22281DDE05AD0703CEB2EF9A27823CB91A9FED034534781492E4B8EEADA3FB0D9844EF8EC5BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D343D1F112031EF3D628B25C05065976EAEF6CEAC00ED15ED33A757430C7E33DAA35E89A92F1AF297C21D7E09C32AA3244C6260FB9635903E6577DD89D51EBB7742319DFA9410284A74EA455F16B58544A2E30DDF7C44BCB90DA5AE236DF995FB59978A700BF655EAEEED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVT0GoR8ZYDe7RbR50DGSN8U= X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140FD4F24C26E91C76591417EB218679B82C8DF77B6A751DFD20152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] gdb: fix flake-7.2.0 F824 warning 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" This is a multi-part message in MIME format. --------------ajyOv2bNWhpvOGEcVealfCQW Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! LGTM On 5/14/25 12:38, Sergey Kaplun wrote: > This patch fixes the flake8 warning F824 [1]: > > | F824 `global gtype_cache` is unused: name is never assigned in scope > > This patch removes the `global` definition inside the function since, > according to [2], it's already considered global. > > [1]:https://flake8.pycqa.org/en/latest/user/error-codes.html > [2]:https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python > --- > > Branch:https://github.com/tarantool/luajit/tree/skaplun/fix-flake8-7.2.0 > > The workflow isn't updated since this version of flake8 is unavailable > for the python 3.8. OTOH, action/setup-python shouldn't be run on > self-hosted runners, see [3]. > > [3]:https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-setup-python-with-a-self-hosted-runner > > src/luajit-gdb.py | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py > index d2070e9b..0ae2a6e0 100644 > --- a/src/luajit-gdb.py > +++ b/src/luajit-gdb.py > @@ -23,7 +23,6 @@ gtype_cache = {} > > > def gtype(typestr): > - global gtype_cache > if typestr in gtype_cache: > return gtype_cache[typestr] > --------------ajyOv2bNWhpvOGEcVealfCQW Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch! LGTM

On 5/14/25 12:38, Sergey Kaplun wrote:
This patch fixes the flake8 warning F824 [1]:

| F824 `global gtype_cache` is unused: name is never assigned in scope

This patch removes the `global` definition inside the function since,
according to [2], it's already considered global.

[1]: https://flake8.pycqa.org/en/latest/user/error-codes.html
[2]: https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python
---

Branch: https://github.com/tarantool/luajit/tree/skaplun/fix-flake8-7.2.0

The workflow isn't updated since this version of flake8 is unavailable
for the python 3.8. OTOH, action/setup-python shouldn't be run on
self-hosted runners, see [3].

[3]: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-setup-python-with-a-self-hosted-runner

 src/luajit-gdb.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
index d2070e9b..0ae2a6e0 100644
--- a/src/luajit-gdb.py
+++ b/src/luajit-gdb.py
@@ -23,7 +23,6 @@ gtype_cache = {}
 
 
 def gtype(typestr):
-    global gtype_cache
     if typestr in gtype_cache:
         return gtype_cache[typestr]
 
--------------ajyOv2bNWhpvOGEcVealfCQW--