What if you use:

bd.executemany(
        "INSERT INTO [...]",
        data
)

?

On Sat, Jul 2, 2022 at 3:00 PM Dedeco Balaco via code-quality <
code-quality@python.org> wrote:

> Hello,
>
> please reply to my address too, I am not subscribed to the mailing list.
> Click "reply all" or add my address when you reply to this message.
>
> min.py:41:4: W0104: Statement seems to have no effect (pointless-statement)
> min.py:42:4: W0104: Statement seems to have no effect (pointless-statement)
>
> for the code
>
> # This is line 39
> try:
>     bd.executemany
>     (
>         "INSERT INTO [...]",
>         data
>     )
>     print( "- [...]" )
>     con.commit()
>     print( "- [...]" )
>     con.close()
>     print( "- [...]" )
>     sys.exit( 0 )
>     print( "- after sys.exit(0)" )
> except:
>     print( "- exc!" )
>     print( sys.exc_info() )
>     con.close()
>     sys.exit( 2 )
>
> *pylint *is saying that lines 41 and 42 are pointless, which is obviously
> false. So, this is a bug in it. I do not want to write that call in only
> one line to make my code easier to be read and understood. What you think?
>
> Please reply to my address too, I am not subscribed to the mailing list.
> Click "reply all" or add my address when you reply to this message.
>
> Thank you
> _______________________________________________
> code-quality mailing list -- code-quality@python.org
> To unsubscribe send an email to code-quality-le...@python.org
> https://mail.python.org/mailman3/lists/code-quality.python.org/
> Member address: strom...@gmail.com
>
_______________________________________________
code-quality mailing list -- code-quality@python.org
To unsubscribe send an email to code-quality-le...@python.org
https://mail.python.org/mailman3/lists/code-quality.python.org/
Member address: arch...@mail-archive.com

Reply via email to