public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Fix two minor flake8 issues
Date: Fri, 23 Feb 2024 12:01:45 -0700	[thread overview]
Message-ID: <20240223190145.3629627-1-tromey@adacore.com> (raw)

flake8 pointed out some extra whitespace around ':' in some Python
code.
---
 gdb/python/lib/gdb/command/frame_filters.py | 2 +-
 gdb/python/lib/gdb/prompt.py                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py
index 47045518e64..41f61ff19bc 100644
--- a/gdb/python/lib/gdb/command/frame_filters.py
+++ b/gdb/python/lib/gdb/command/frame_filters.py
@@ -191,7 +191,7 @@ def _complete_frame_filter_list(text, word, all_flag):
 
     # If we only have one completion, complete it and return it.
     if len(flist) == 1:
-        flist[0] = flist[0][len(text) - len(word) :]
+        flist[0] = flist[0][len(text) - len(word):]
 
     # Otherwise, return an empty list, or a list of frame filter
     # dictionaries that the previous filter operation returned.
diff --git a/gdb/python/lib/gdb/prompt.py b/gdb/python/lib/gdb/prompt.py
index 02185b353df..e00e4b0a521 100644
--- a/gdb/python/lib/gdb/prompt.py
+++ b/gdb/python/lib/gdb/prompt.py
@@ -146,7 +146,7 @@ def substitute_prompt(prompt):
                     if j >= plen or prompt[j] != "}":
                         arg = None
                     else:
-                        arg = prompt[i + 2 : j]
+                        arg = prompt[i + 2:j]
                         i = j
                 else:
                     arg = None
-- 
2.43.0


             reply	other threads:[~2024-02-23 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 19:01 Tom Tromey [this message]
2024-02-23 19:33 ` Simon Marchi
2024-02-23 19:39   ` 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=20240223190145.3629627-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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).