From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 1/2] Prepare gdb for isort
Date: Wed, 20 Mar 2024 10:38:42 -0600 [thread overview]
Message-ID: <20240320163957.3349962-2-tromey@adacore.com> (raw)
In-Reply-To: <20240320163957.3349962-1-tromey@adacore.com>
This patch prepares gdb for isort: it adds a couple of isort marker
comments where needed, and it adds an isort clause to setup.cfg.
---
gdb/python/lib/gdb/__init__.py | 1 +
gdb/python/lib/gdb/dap/__init__.py | 2 ++
gdb/setup.cfg | 3 +++
3 files changed, 6 insertions(+)
diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py
index e7d21fe8d27..5b96605240e 100644
--- a/gdb/python/lib/gdb/__init__.py
+++ b/gdb/python/lib/gdb/__init__.py
@@ -27,6 +27,7 @@ else:
from imp import reload
# Note that two indicators are needed here to silence flake8.
+# isort: split
from _gdb import * # noqa: F401,F403
# Historically, gdb.events was always available, so ensure it's
diff --git a/gdb/python/lib/gdb/dap/__init__.py b/gdb/python/lib/gdb/dap/__init__.py
index f947314880c..81d435e742f 100644
--- a/gdb/python/lib/gdb/dap/__init__.py
+++ b/gdb/python/lib/gdb/dap/__init__.py
@@ -16,6 +16,7 @@
import os
# This must come before other DAP imports.
+# isort: split
from . import startup
# Load modules that define commands. These imports intentionally
@@ -36,6 +37,7 @@ from . import scopes # noqa: F401
from . import sources # noqa: F401
from . import threads # noqa: F401
+# isort: split
from .server import Server
diff --git a/gdb/setup.cfg b/gdb/setup.cfg
index 2e83eb5cf56..d33058ea7f0 100644
--- a/gdb/setup.cfg
+++ b/gdb/setup.cfg
@@ -7,3 +7,6 @@
# E701: Multiple statements on one line (colon)
# W503: line break before binary operator
ignore = E203,E501,E701,W503
+
+[isort]
+profile = black
--
2.43.0
next prev parent reply other threads:[~2024-03-20 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 16:38 [PATCH 0/2] Use isort in gdb Tom Tromey
2024-03-20 16:38 ` Tom Tromey [this message]
2024-03-20 16:38 ` [PATCH 2/2] Run isort Tom Tromey
2024-04-02 17:20 ` Tom Tromey
2024-03-20 19:03 ` [PATCH 0/2] Use isort in gdb Simon Marchi
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=20240320163957.3349962-2-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).