public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: disable formatting-related flake8 warnings
@ 2024-02-23 21:58 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2024-02-23 21:58 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b958f6af322de9791d9b1a5207b8fee1817d5779

commit b958f6af322de9791d9b1a5207b8fee1817d5779
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri Feb 23 15:43:02 2024 -0500

    gdb: disable formatting-related flake8 warnings
    
    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
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/setup.cfg | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/setup.cfg b/gdb/setup.cfg
new file mode 100644
index 00000000000..13aefa0342d
--- /dev/null
+++ b/gdb/setup.cfg
@@ -0,0 +1,8 @@
+[flake8]
+# Disable some formatted-related warnings that conflict with black's way of
+# formatting code.
+#
+# E203: Whitespace before ':'
+# E501: line too long
+# E701: Multiple statements on one line (colon)
+ignore = E203,E501,E701

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-23 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 21:58 [binutils-gdb] gdb: disable formatting-related flake8 warnings Simon Marchi

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).