public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 8/9] Suppress some "undefined" warnings from flake8
Date: Wed, 20 Mar 2024 14:58:09 -0400	[thread overview]
Message-ID: <f441497c-ffa6-4921-a4cb-6d6313229c4a@simark.ca> (raw)
In-Reply-To: <20240319-more-flake8-v1-8-893549dbed75@adacore.com>

On 3/19/24 13:33, Tom Tromey wrote:
> flake8 warns about some identifiers in __init__.py, because it does
> not realize these come from the star-imported _gdb module.  This patch
> suppresses these warnings.
> ---
>  gdb/python/lib/gdb/__init__.py | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py
> index 2ff1f95c8fd..cff2f3afa49 100644
> --- a/gdb/python/lib/gdb/__init__.py
> +++ b/gdb/python/lib/gdb/__init__.py
> @@ -56,15 +56,14 @@ class _GdbFile(object):
>              self.write(line)
>  
>      def flush(self):
> -        flush(stream=self.stream)
> +        flush(stream=self.stream)  # noqa: F405

So, this calls _gdb.flush?  I would prefer if those calls were qualified
(not relying on the star import), so that we wouldn't have to guess
where these symbols come from.  Is it possible to do, in addition of
having the star import (needed to re-export stuff)?

Simon

  reply	other threads:[~2024-03-20 18:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 17:33 [PATCH 0/9] Make gdb/python flake-clean Tom Tromey
2024-03-19 17:33 ` [PATCH 1/9] Remove .flake8 Tom Tromey
2024-03-19 17:33 ` [PATCH 2/9] Fix flake8 errors in dap/server.py Tom Tromey
2024-03-19 17:33 ` [PATCH 3/9] Ignore unsed import in dap/__init__.py Tom Tromey
2024-03-20 15:35   ` Tom Tromey
2024-03-19 17:33 ` [PATCH 4/9] Remove unused import from gdb/__init__.py Tom Tromey
2024-03-19 17:33 ` [PATCH 5/9] Remove bare "except" from disassembler.py Tom Tromey
2024-03-19 17:33 ` [PATCH 6/9] Suppress star import errors Tom Tromey
2024-03-19 17:33 ` [PATCH 7/9] Specify ImportError in styling.py Tom Tromey
2024-03-19 17:33 ` [PATCH 8/9] Suppress some "undefined" warnings from flake8 Tom Tromey
2024-03-20 18:58   ` Simon Marchi [this message]
2024-03-20 20:30     ` Tom Tromey
2024-03-20 20:32       ` Tom Tromey
2024-03-19 17:33 ` [PATCH 9/9] Do not use bare "except" Tom Tromey
2024-03-20 19:01 ` [PATCH 0/9] Make gdb/python flake-clean Simon Marchi
2024-04-02 17:01 ` Tom Tromey

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=f441497c-ffa6-4921-a4cb-6d6313229c4a@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).