public inbox for
 help / color / mirror / Atom feed
From: Tom Tromey <>
Cc:, Tom Tromey <>
Subject: [RFC 2/2] libstdc++: Add flake8 configuration
Date: Wed,  4 Oct 2023 10:58:32 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

flake8 is a Python linter.  This patch adds a .flake8 configuration
file (flake8 does not use pyproject.toml for some reason) and fixes a
few trivial flake8 warnings.

After this patch, the only remaining flake8 warnings are about unused
imports (there are two - but they are not completely trivial to
remove) and the use of bare "except:".

It is possible to change the flake8 configuration to suppress these
warnings, but I haven't done so here.


	* python/.flake8: New file.
	* python/libstdcxx/v6/ Remove blank line.
	* python/libstdcxx/v6/ Reformat two comments.
 libstdc++-v3/python/.flake8                  | 3 +++
 libstdc++-v3/python/libstdcxx/    | 1 -
 libstdc++-v3/python/libstdcxx/v6/ | 8 ++++----
 3 files changed, 7 insertions(+), 5 deletions(-)
 create mode 100644 libstdc++-v3/python/.flake8

diff --git a/libstdc++-v3/python/.flake8 b/libstdc++-v3/python/.flake8
new file mode 100644
index 00000000000..7ffe4d6e0f7
--- /dev/null
+++ b/libstdc++-v3/python/.flake8
@@ -0,0 +1,3 @@
+max-line-length = 79
+extend-ignore = E203
diff --git a/libstdc++-v3/python/libstdcxx/ b/libstdc++-v3/python/libstdcxx/
index 8b137891791..e69de29bb2d 100644
--- a/libstdc++-v3/python/libstdcxx/
+++ b/libstdc++-v3/python/libstdcxx/
@@ -1 +0,0 @@
diff --git a/libstdc++-v3/python/libstdcxx/v6/ b/libstdc++-v3/python/libstdcxx/v6/
index e26b8b36013..202fa450a91 100644
--- a/libstdc++-v3/python/libstdcxx/v6/
+++ b/libstdc++-v3/python/libstdcxx/v6/
@@ -2672,8 +2672,8 @@ class FilteringTypePrinter(object):
         name (str): The typedef-name that will be used instead.
         targ1 (str, optional): The first template argument. Defaults to None.
-    Checks if a specialization of the class template 'template' is the same type
-    as the typedef 'name', and prints it as 'name' instead.
+    Checks if a specialization of the class template 'template' is the same
+    type as the typedef 'name', and prints it as 'name' instead.
     e.g. if an instantiation of std::basic_istream<C, T> is the same type as
     std::istream then print it as std::istream.
@@ -3167,8 +3167,8 @@ def build_libstdcxx_dictionary():
         'std::chrono::', 'tzdb', StdChronoTzdbPrinter
-    # libstdcxx_printer.add_version('std::chrono::(anonymous namespace)', 'Rule',
-    #                              StdChronoTimeZoneRulePrinter)
+    # libstdcxx_printer.add_version('std::chrono::(anonymous namespace)',
+    #                               'Rule', StdChronoTimeZoneRulePrinter)
     # Extensions.
     libstdcxx_printer.add_version('__gnu_cxx::', 'slist', StdSlistPrinter)

  parent reply	other threads:[~2023-10-04 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 16:58 [RFC 0/2] black, isort, and " Tom Tromey
2023-10-04 16:58 ` [RFC 1/2] libstdc++: Use 'black' and 'isort' in pretty printers Tom Tromey
2023-10-04 16:58 ` Tom Tromey [this message]
2024-04-04 13:32 ` [RFC 0/2] black, isort, and flake8 configuration 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

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