Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH luajit] gdb: fix flake-7.2.0 F824 warning
Date: Wed, 14 May 2025 12:38:26 +0300	[thread overview]
Message-ID: <20250514093826.31470-1-skaplun@tarantool.org> (raw)

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]
 
-- 
2.49.0


             reply	other threads:[~2025-05-14  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14  9:38 Sergey Kaplun via Tarantool-patches [this message]
2025-05-14 10:51 ` Sergey Bronnikov via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250514093826.31470-1-skaplun@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] gdb: fix flake-7.2.0 F824 warning' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox