From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH] gdb: disable formatting-related flake8 warnings
Date: Fri, 23 Feb 2024 15:43:02 -0500 [thread overview]
Message-ID: <20240223204309.416580-1-simon.marchi@polymtl.ca> (raw)
Tom Tromey pointed out that flake8 gives some warnings related to
formatting, such as:
python/lib/gdb/prompt.py:149:43: E203 whitespace before ':'
We don't care about those, since all our formatting is handled
automatically by black, so ignore these warnings.
The list of warnings I put comes from:
https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
Note that since the setup.cfg file is under the gdb directory, it will
be picked up if you run flake8 from the gdb directory like this:
binutils-gdb/gdb $ flake8 python
but not if you do:
binutils-gdb $ flake8 gdb/python
Change-Id: I1e42aefd388b9c3b6c9d52b4f635ac881db4bbc1
---
gdb/setup.cfg | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 gdb/setup.cfg
diff --git a/gdb/setup.cfg b/gdb/setup.cfg
new file mode 100644
index 000000000000..28d7c876b33c
--- /dev/null
+++ b/gdb/setup.cfg
@@ -0,0 +1,5 @@
+[flake8]
+# E203: Whitespace before ':' (conclicts with black's way of formatting)
+# E501: line too long
+# E701: Multiple statements on one line (colon) (E701)
+ignore = E203,E501,E701
base-commit: bf8ab2ae8d33e46bb6612408c75e75a6de137ccc
--
2.43.2
next reply other threads:[~2024-02-23 20:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 20:43 Simon Marchi [this message]
2024-02-23 21:07 ` Tom Tromey
2024-02-23 22:00 ` 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=20240223204309.416580-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--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).