[Tarantool-patches] [PATCH luajit 18/15] test: suppress E131 errors by pycodestyle
Maxim Kokryashkin
m.kokryashkin at tarantool.org
Sun Aug 13 16:52:04 MSK 2023
Hi, Igor!
Thanks for the patch!
LGTM, except for a few typos below.
On Tue, Aug 08, 2023 at 07:42:39PM +0000, Igor Munkin wrote:
> Suppressed 4 occurrences of E131 ("continuation line unaligned for
Typo: s/of/of the/
> hanging indent") error reported by pycodestyle[1]. The reasons, why
> these violations are not fixed the way recommended in the docs are
> below:
> * The only difference between prefix and postfix loop statements (the
> latter is used in various generators and comprehensions) is the
> trailing colon.
> * The surrounding code is quite complex consisting of the cascade of the
> calls and list comprehensions.
>
> Hence, to emphasis the postfix loop used in list comprehensions,
Typo: s/to emphasis/to emphasize/
> additional indent is preserved and inline <noqa> suppressions are added.
>
> [1]: https://www.flake8rules.com/rules/E131.html
>
> Signed-off-by: Igor Munkin <imun at tarantool.org>
> ---
>
> **NB**: This patch will be placed between "[PATCH luajit 02/15] test:
> fix E128 errors by pycodestyle" and "[PATCH luajit 03/15] test: fix E201
> and E202 errors by pycodestyle" on the branch.
>
> CI: https://github.com/tarantool/luajit/actions/runs/5800936024/job/15724104222
>
> src/luajit-gdb.py | 4 ++--
> src/luajit_lldb.py | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
> index f9623e53..9dcddb17 100644
> --- a/src/luajit-gdb.py
> +++ b/src/luajit-gdb.py
> @@ -553,7 +553,7 @@ def dump_stack(L, base=None, top=None):
> ]
> dump.extend([
> dump_stack_slot(L, maxstack + offset, base, top)
> - for offset in range(red, 0, -1)
> + for offset in range(red, 0, -1) # noqa: E131
> ])
> dump.extend([
> '{padding} Stack: {nstackslots: >5} slots {padding}'.format(
> @@ -572,7 +572,7 @@ def dump_stack(L, base=None, top=None):
> # Dump all data slots in the (framelink, top) interval.
> dump.extend([
> dump_stack_slot(L, framelink + offset, base, top)
> - for offset in range(frametop - framelink, 0, -1)
> + for offset in range(frametop - framelink, 0, -1) # noqa: E131
> ])
> # Dump frame slot (2 slots in case of GC64).
> dump.append(dump_framelink(L, framelink))
> diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py
> index 53f3abca..13d9f2e3 100644
> --- a/src/luajit_lldb.py
> +++ b/src/luajit_lldb.py
> @@ -844,7 +844,7 @@ def dump_stack(L, base=None, top=None):
> ]
> dump.extend([
> dump_stack_slot(L, maxstack + offset, base, top)
> - for offset in range(red, 0, -1)
> + for offset in range(red, 0, -1) # noqa: E131
> ])
> dump.extend([
> '{padding} Stack: {nstackslots: >5} slots {padding}'.format(
> @@ -864,7 +864,7 @@ def dump_stack(L, base=None, top=None):
> # Dump all data slots in the (framelink, top) interval.
> dump.extend([
> dump_stack_slot(L, framelink + offset, base, top)
> - for offset in range(frametop - framelink, 0, -1)
> + for offset in range(frametop - framelink, 0, -1) # noqa: E131
> ])
> # Dump frame slot (2 slots in case of GC64).
> dump.append(dump_framelink(L, framelink))
> --
> 2.30.2
>
Best regards,
Maxim Kokryashkin
More information about the Tarantool-patches
mailing list