[Tarantool-patches] [PATCH luajit] gdb: fix flake-7.2.0 F824 warning
Sergey Bronnikov
sergeyb at tarantool.org
Wed May 14 13:51:16 MSK 2025
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]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20250514/e01de6fe/attachment.htm>
More information about the Tarantool-patches
mailing list