Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>,
	Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 04/15] test: fix E203 errors by pycodestyle
Date: Thu, 3 Aug 2023 17:26:45 +0300	[thread overview]
Message-ID: <5a615911-f20c-5c30-3f6b-cb301c8849ae@tarantool.org> (raw)
In-Reply-To: <5a16585529e852321935087e631895722b3dc5b7.1691047132.git.imun@tarantool.org>

LGTM

On 8/3/23 10:30, Igor Munkin wrote:
> Fixed 36 occurrences of E203 ("whitespace before ':'") error reported
> by pycodestyle[1]. Furthermore, many other parts have been re-aligned
> the similar way to be in sync with the default code style.
>
> [1]: https://www.flake8rules.com/rules/E203.html
>
> Signed-off-by: Igor Munkin <imun@tarantool.org>
> ---
>   src/luajit-gdb.py  |  98 +++++++++++++++++++++----------------------
>   src/luajit_lldb.py | 102 ++++++++++++++++++++++-----------------------
>   2 files changed, 100 insertions(+), 100 deletions(-)
>
> diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
> index 198578b1..09899f58 100644
> --- a/src/luajit-gdb.py
> +++ b/src/luajit-gdb.py
> @@ -65,20 +65,20 @@ def strx64(val):
>   # Types {{{
>   
>   LJ_T = {
> -    'NIL'     : i2notu32(0),
> -    'FALSE'   : i2notu32(1),
> -    'TRUE'    : i2notu32(2),
> -    'LIGHTUD' : i2notu32(3),
> -    'STR'     : i2notu32(4),
> -    'UPVAL'   : i2notu32(5),
> -    'THREAD'  : i2notu32(6),
> -    'PROTO'   : i2notu32(7),
> -    'FUNC'    : i2notu32(8),
> -    'TRACE'   : i2notu32(9),
> -    'CDATA'   : i2notu32(10),
> -    'TAB'     : i2notu32(11),
> -    'UDATA'   : i2notu32(12),
> -    'NUMX'    : i2notu32(13),
> +    'NIL':     i2notu32(0),
> +    'FALSE':   i2notu32(1),
> +    'TRUE':    i2notu32(2),
> +    'LIGHTUD': i2notu32(3),
> +    'STR':     i2notu32(4),
> +    'UPVAL':   i2notu32(5),
> +    'THREAD':  i2notu32(6),
> +    'PROTO':   i2notu32(7),
> +    'FUNC':    i2notu32(8),
> +    'TRACE':   i2notu32(9),
> +    'CDATA':   i2notu32(10),
> +    'TAB':     i2notu32(11),
> +    'UDATA':   i2notu32(12),
> +    'NUMX':    i2notu32(13),
>   }
>   
>   def typenames(value):
> @@ -95,22 +95,22 @@ FRAME_P = 0x4
>   FRAME_TYPEP = FRAME_TYPE | FRAME_P
>   
>   FRAME = {
> -    'LUA': 0x0,
> -    'C': 0x1,
> -    'CONT': 0x2,
> -    'VARG': 0x3,
> -    'LUAP': 0x4,
> -    'CP': 0x5,
> -    'PCALL': 0x6,
> +    'LUA':    0x0,
> +    'C':      0x1,
> +    'CONT':   0x2,
> +    'VARG':   0x3,
> +    'LUAP':   0x4,
> +    'CP':     0x5,
> +    'PCALL':  0x6,
>       'PCALLH': 0x7,
>   }
>   
>   def frametypes(ft):
>       return {
> -        FRAME['LUA']  : 'L',
> -        FRAME['C']    : 'C',
> -        FRAME['CONT'] : 'M',
> -        FRAME['VARG'] : 'V',
> +        FRAME['LUA']:  'L',
> +        FRAME['C']:    'C',
> +        FRAME['CONT']: 'M',
> +        FRAME['VARG']: 'V',
>       }.get(ft, '?')
>   
>   def bc_a(ins):
> @@ -299,12 +299,12 @@ def gcringlen(root):
>           return 1 + gclistlen(gcnext(root), gcref(root))
>   
>   gclen = {
> -    'root': gclistlen,
> -    'gray': gclistlen,
> +    'root':      gclistlen,
> +    'gray':      gclistlen,
>       'grayagain': gclistlen,
> -    'weak': gclistlen,
> +    'weak':      gclistlen,
>       # XXX: gc.mmudata is a ring-list.
> -    'mmudata': gcringlen,
> +    'mmudata':   gcringlen,
>   }
>   
>   # The generator that implements frame iterator.
> @@ -410,20 +410,20 @@ def dump_lj_invalid(tv):
>   # }}}
>   
>   dumpers = {
> -    'LJ_TNIL': dump_lj_tnil,
> -    'LJ_TFALSE': dump_lj_tfalse,
> -    'LJ_TTRUE': dump_lj_ttrue,
> +    'LJ_TNIL':     dump_lj_tnil,
> +    'LJ_TFALSE':   dump_lj_tfalse,
> +    'LJ_TTRUE':    dump_lj_ttrue,
>       'LJ_TLIGHTUD': dump_lj_tlightud,
> -    'LJ_TSTR': dump_lj_tstr,
> -    'LJ_TUPVAL': dump_lj_tupval,
> -    'LJ_TTHREAD': dump_lj_tthread,
> -    'LJ_TPROTO': dump_lj_tproto,
> -    'LJ_TFUNC': dump_lj_tfunc,
> -    'LJ_TTRACE': dump_lj_ttrace,
> -    'LJ_TCDATA': dump_lj_tcdata,
> -    'LJ_TTAB': dump_lj_ttab,
> -    'LJ_TUDATA': dump_lj_tudata,
> -    'LJ_TNUMX': dump_lj_tnumx,
> +    'LJ_TSTR':     dump_lj_tstr,
> +    'LJ_TUPVAL':   dump_lj_tupval,
> +    'LJ_TTHREAD':  dump_lj_tthread,
> +    'LJ_TPROTO':   dump_lj_tproto,
> +    'LJ_TFUNC':    dump_lj_tfunc,
> +    'LJ_TTRACE':   dump_lj_ttrace,
> +    'LJ_TCDATA':   dump_lj_tcdata,
> +    'LJ_TTAB':     dump_lj_ttab,
> +    'LJ_TUDATA':   dump_lj_tudata,
> +    'LJ_TNUMX':    dump_lj_tnumx,
>   }
>   
>   def dump_tvalue(tvalue):
> @@ -695,8 +695,8 @@ The command requires no args and dumps current VM and GC states
>           g = G(L(None))
>           gdb.write('{}\n'.format('\n'.join(
>               map(lambda t: '{} state: {}'.format(*t), {
> -                'VM': vm_state(g),
> -                'GC': gc_state(g),
> +                'VM':  vm_state(g),
> +                'GC':  gc_state(g),
>                   'JIT': jit_state(g),
>               }.items())
>           )))
> @@ -785,13 +785,13 @@ def init(commands):
>   
>   def load(event=None):
>       init({
> -        'lj-arch': LJDumpArch,
> -        'lj-tv': LJDumpTValue,
> -        'lj-str': LJDumpString,
> -        'lj-tab': LJDumpTable,
> +        'lj-arch':  LJDumpArch,
> +        'lj-tv':    LJDumpTValue,
> +        'lj-str':   LJDumpString,
> +        'lj-tab':   LJDumpTable,
>           'lj-stack': LJDumpStack,
>           'lj-state': LJState,
> -        'lj-gc': LJGC,
> +        'lj-gc':    LJGC,
>       })
>   
>   load(None)
> diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py
> index 2887723b..b9c8a0b9 100644
> --- a/src/luajit_lldb.py
> +++ b/src/luajit_lldb.py
> @@ -88,8 +88,8 @@ class MetaStruct(type):
>   
>           def make_general(field, tp):
>               builtin = {
> -                        'uint': 'unsigned',
> -                        'int': 'signed',
> +                        'uint':   'unsigned',
> +                        'int':    'signed',
>                           'string': 'value',
>                       }
>               if tp in builtin.keys():
> @@ -380,12 +380,12 @@ def gcringlen(root):
>           return 1 + gclistlen(gcnext(root), gcref(root))
>   
>   gclen = {
> -    'root': gclistlen,
> -    'gray': gclistlen,
> +    'root':      gclistlen,
> +    'gray':      gclistlen,
>       'grayagain': gclistlen,
> -    'weak': gclistlen,
> +    'weak':      gclistlen,
>       # XXX: gc.mmudata is a ring-list.
> -    'mmudata': gcringlen,
> +    'mmudata':   gcringlen,
>   }
>   
>   def dump_gc(g):
> @@ -582,37 +582,37 @@ def dump_lj_invalid(tv):
>       return 'not valid type @ {}'.format(strx64(gcval(tv.gcr)))
>   
>   dumpers = {
> -    'LJ_TNIL': dump_lj_tnil,
> -    'LJ_TFALSE': dump_lj_tfalse,
> -    'LJ_TTRUE': dump_lj_ttrue,
> +    'LJ_TNIL':     dump_lj_tnil,
> +    'LJ_TFALSE':   dump_lj_tfalse,
> +    'LJ_TTRUE':    dump_lj_ttrue,
>       'LJ_TLIGHTUD': dump_lj_tlightud,
> -    'LJ_TSTR': dump_lj_tstr,
> -    'LJ_TUPVAL': dump_lj_tupval,
> -    'LJ_TTHREAD': dump_lj_tthread,
> -    'LJ_TPROTO': dump_lj_tproto,
> -    'LJ_TFUNC': dump_lj_tfunc,
> -    'LJ_TTRACE': dump_lj_ttrace,
> -    'LJ_TCDATA': dump_lj_tcdata,
> -    'LJ_TTAB': dump_lj_ttab,
> -    'LJ_TUDATA': dump_lj_tudata,
> -    'LJ_TNUMX': dump_lj_tnumx,
> +    'LJ_TSTR':     dump_lj_tstr,
> +    'LJ_TUPVAL':   dump_lj_tupval,
> +    'LJ_TTHREAD':  dump_lj_tthread,
> +    'LJ_TPROTO':   dump_lj_tproto,
> +    'LJ_TFUNC':    dump_lj_tfunc,
> +    'LJ_TTRACE':   dump_lj_ttrace,
> +    'LJ_TCDATA':   dump_lj_tcdata,
> +    'LJ_TTAB':     dump_lj_ttab,
> +    'LJ_TUDATA':   dump_lj_tudata,
> +    'LJ_TNUMX':    dump_lj_tnumx,
>   }
>   
>   LJ_T = {
> -    'NIL'     : i2notu32(0),
> -    'FALSE'   : i2notu32(1),
> -    'TRUE'    : i2notu32(2),
> -    'LIGHTUD' : i2notu32(3),
> -    'STR'     : i2notu32(4),
> -    'UPVAL'   : i2notu32(5),
> -    'THREAD'  : i2notu32(6),
> -    'PROTO'   : i2notu32(7),
> -    'FUNC'    : i2notu32(8),
> -    'TRACE'   : i2notu32(9),
> -    'CDATA'   : i2notu32(10),
> -    'TAB'     : i2notu32(11),
> -    'UDATA'   : i2notu32(12),
> -    'NUMX'    : i2notu32(13),
> +    'NIL':     i2notu32(0),
> +    'FALSE':   i2notu32(1),
> +    'TRUE':    i2notu32(2),
> +    'LIGHTUD': i2notu32(3),
> +    'STR':     i2notu32(4),
> +    'UPVAL':   i2notu32(5),
> +    'THREAD':  i2notu32(6),
> +    'PROTO':   i2notu32(7),
> +    'FUNC':    i2notu32(8),
> +    'TRACE':   i2notu32(9),
> +    'CDATA':   i2notu32(10),
> +    'TAB':     i2notu32(11),
> +    'UDATA':   i2notu32(12),
> +    'NUMX':    i2notu32(13),
>   }
>   
>   def itypemap(o):
> @@ -635,22 +635,22 @@ FRAME_P = 0x4
>   FRAME_TYPEP = FRAME_TYPE | FRAME_P
>   
>   FRAME = {
> -    'LUA': 0x0,
> -    'C': 0x1,
> -    'CONT': 0x2,
> -    'VARG': 0x3,
> -    'LUAP': 0x4,
> -    'CP': 0x5,
> -    'PCALL': 0x6,
> +    'LUA':    0x0,
> +    'C':      0x1,
> +    'CONT':   0x2,
> +    'VARG':   0x3,
> +    'LUAP':   0x4,
> +    'CP':     0x5,
> +    'PCALL':  0x6,
>       'PCALLH': 0x7,
>   }
>   
>   def frametypes(ft):
>       return {
> -        FRAME['LUA']  : 'L',
> -        FRAME['C']    : 'C',
> -        FRAME['CONT'] : 'M',
> -        FRAME['VARG'] : 'V',
> +        FRAME['LUA']:  'L',
> +        FRAME['C']:    'C',
> +        FRAME['CONT']: 'M',
> +        FRAME['VARG']: 'V',
>       }.get(ft, '?')
>   
>   def bc_a(ins):
> @@ -838,8 +838,8 @@ The command requires no args and dumps current VM and GC states
>           g = G(L(None))
>           print('{}'.format('\n'.join(
>               map(lambda t: '{} state: {}'.format(*t), {
> -                'VM': vm_state(g),
> -                'GC': gc_state(g),
> +                'VM':  vm_state(g),
> +                'GC':  gc_state(g),
>                   'JIT': jit_state(g),
>               }.items())
>           )))
> @@ -1024,12 +1024,12 @@ def configure(debugger):
>   def __lldb_init_module(debugger, internal_dict):
>       configure(debugger)
>       register_commands(debugger, {
> -        'lj-tv': LJDumpTValue,
> +        'lj-tv':    LJDumpTValue,
>           'lj-state': LJState,
> -        'lj-arch': LJDumpArch,
> -        'lj-gc': LJGC,
> -        'lj-str': LJDumpString,
> -        'lj-tab': LJDumpTable,
> +        'lj-arch':  LJDumpArch,
> +        'lj-gc':    LJGC,
> +        'lj-str':   LJDumpString,
> +        'lj-tab':   LJDumpTable,
>           'lj-stack': LJDumpStack,
>       })
>       print('luajit_lldb.py is successfully loaded')

  reply	other threads:[~2023-08-03 14:27 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  7:30 [Tarantool-patches] [PATCH luajit 00/15] Add flake8 linter Igor Munkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 01/15] test: fix E122 errors by pycodestyle Igor Munkin via Tarantool-patches
2023-08-03 14:25   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 15:49   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 02/15] test: fix E128 " Igor Munkin via Tarantool-patches
2023-08-03 14:26   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 15:52   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 03/15] test: fix E201 and E202 " Igor Munkin via Tarantool-patches
2023-08-03 14:26   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 15:53   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 04/15] test: fix E203 " Igor Munkin via Tarantool-patches
2023-08-03 14:26   ` Sergey Bronnikov via Tarantool-patches [this message]
2023-08-03 15:55   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 05/15] test: fix E231 " Igor Munkin via Tarantool-patches
2023-08-03 14:26   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 15:55   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 06/15] test: fix E251 " Igor Munkin via Tarantool-patches
2023-08-03 14:27   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 15:58   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 07/15] test: fix E301 " Igor Munkin via Tarantool-patches
2023-08-03 14:28   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:01   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 08/15] test: fix E302 " Igor Munkin via Tarantool-patches
2023-08-03 14:28   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:02   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 09/15] test: fix E303 " Igor Munkin via Tarantool-patches
2023-08-03 14:28   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:03   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 10/15] test: fix E305 " Igor Munkin via Tarantool-patches
2023-08-03 14:28   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:05   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 11/15] test: fix E502 " Igor Munkin via Tarantool-patches
2023-08-03 14:29   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:06   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 12/15] test: fix E711 " Igor Munkin via Tarantool-patches
2023-08-03 14:29   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:06   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 13/15] test: fix E722 " Igor Munkin via Tarantool-patches
2023-08-03 14:29   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:10   ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 14/15] test: fix E741 " Igor Munkin via Tarantool-patches
2023-08-03 14:34   ` Sergey Bronnikov via Tarantool-patches
2023-08-07 11:00     ` Igor Munkin via Tarantool-patches
2023-08-07 13:45       ` Sergey Bronnikov via Tarantool-patches
2023-08-03 16:15   ` Maxim Kokryashkin via Tarantool-patches
2023-08-07 10:57     ` Igor Munkin via Tarantool-patches
2023-08-13 20:25       ` Maxim Kokryashkin via Tarantool-patches
2023-08-03  7:30 ` [Tarantool-patches] [PATCH luajit 15/15] test: run flake8 static analysis via CMake Igor Munkin via Tarantool-patches
2023-08-03 14:23   ` Sergey Bronnikov via Tarantool-patches
2023-08-03 14:25     ` Sergey Bronnikov via Tarantool-patches
2023-08-07 13:35       ` Igor Munkin via Tarantool-patches
2023-08-07 13:41         ` [Tarantool-patches] [PATCH luajit 16/15] gdb: fix Python <assert> statement usage Igor Munkin via Tarantool-patches
2023-08-08  8:26           ` Sergey Bronnikov via Tarantool-patches
2023-08-13 20:24           ` Maxim Kokryashkin via Tarantool-patches
2023-08-07 13:41         ` [Tarantool-patches] [PATCH luajit 17/15] test: fix E275 errors by pycodestyle Igor Munkin via Tarantool-patches
2023-08-08  8:26           ` Sergey Bronnikov via Tarantool-patches
2023-08-13 19:25           ` Maxim Kokryashkin via Tarantool-patches
2023-08-08  8:18         ` [Tarantool-patches] [PATCH luajit 15/15] test: run flake8 static analysis via CMake Sergey Bronnikov via Tarantool-patches
2023-08-07 12:17     ` Igor Munkin via Tarantool-patches
2023-08-07 13:48       ` Sergey Bronnikov via Tarantool-patches
2023-08-03 21:02   ` Maxim Kokryashkin via Tarantool-patches
2023-08-08 19:29     ` Igor Munkin via Tarantool-patches
2023-08-08 19:42       ` [Tarantool-patches] [PATCH luajit 18/15] test: suppress E131 errors by pycodestyle Igor Munkin via Tarantool-patches
2023-08-13 13:52         ` Maxim Kokryashkin via Tarantool-patches
2023-08-08 19:42       ` [Tarantool-patches] [PATCH luajit 19/15] test: fix E501 " Igor Munkin via Tarantool-patches
2023-08-13 13:55         ` Maxim Kokryashkin via Tarantool-patches
2023-08-14  7:28       ` [Tarantool-patches] [PATCH luajit 15/15] test: run flake8 static analysis via CMake Maxim Kokryashkin via Tarantool-patches
2023-08-21 11:05 ` [Tarantool-patches] [PATCH luajit 00/15] Add flake8 linter Igor Munkin 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=5a615911-f20c-5c30-3f6b-cb301c8849ae@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 04/15] test: fix E203 errors by pycodestyle' \
    /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