[Python-checkins] Run Tools/scripts/reindent.py (GH-94225)

miss-islington webhook-mailer at python.org
Sun Jun 26 04:56:59 EDT 2022


https://github.com/python/cpython/commit/f0f3a424afb00a15ce8c0140dd218f5b33929be6
commit: f0f3a424afb00a15ce8c0140dd218f5b33929be6
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-06-26T01:56:55-07:00
summary:

Run Tools/scripts/reindent.py (GH-94225)


Reindent files which were not properly formatted (PEP 8: 4 spaces).

Remove also some trailing spaces.
(cherry picked from commit e87ada48a9e5d9d03f9759138869216df0d7383a)

Co-authored-by: Victor Stinner <vstinner at python.org>

files:
M Lib/http/client.py
M Lib/test/libregrtest/setup.py
M Lib/test/test_ast.py
M Lib/test/test_except_star.py

diff --git a/Lib/http/client.py b/Lib/http/client.py
index f54172fd0deea..4622a8f4297d3 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -942,7 +942,7 @@ def connect(self):
             (self.host,self.port), self.timeout, self.source_address)
         # Might fail in OSs that don't implement TCP_NODELAY
         try:
-             self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+            self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
         except OSError as e:
             if e.errno != errno.ENOPROTOOPT:
                 raise
diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py
index cfc1b82d2785c..c097d6d597aa0 100644
--- a/Lib/test/libregrtest/setup.py
+++ b/Lib/test/libregrtest/setup.py
@@ -157,4 +157,3 @@ def _adjust_resource_limits():
         except (ValueError, OSError) as err:
             print(f"Unable to raise RLIMIT_NOFILE from {fd_limit} to "
                   f"{new_fd_limit}: {err}.")
-
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 33df22cb35a9e..225892414b8c1 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -335,7 +335,7 @@ def test_ast_validation(self):
         for snippet in snippets_to_validate:
             tree = ast.parse(snippet)
             compile(tree, '<string>', 'exec')
-    
+
     def test_invalid_position_information(self):
         invalid_linenos = [
             (10, 1), (-10, -11), (10, -11), (-5, -2), (-5, 1)
@@ -364,7 +364,7 @@ def test_invalid_position_information(self):
 
     def test_compilation_of_ast_nodes_with_default_end_position_values(self):
         tree = ast.Module(body=[
-            ast.Import(names=[ast.alias(name='builtins', lineno=1, col_offset=0)], lineno=1, col_offset=0), 
+            ast.Import(names=[ast.alias(name='builtins', lineno=1, col_offset=0)], lineno=1, col_offset=0),
             ast.Import(names=[ast.alias(name='traceback', lineno=0, col_offset=0)], lineno=0, col_offset=1)
         ], type_ignores=[])
 
diff --git a/Lib/test/test_except_star.py b/Lib/test/test_except_star.py
index 490b159e3b71b..dbe8eff32924e 100644
--- a/Lib/test/test_except_star.py
+++ b/Lib/test/test_except_star.py
@@ -955,7 +955,7 @@ def derive(self, excs):
     def test_falsy_exception_group_subclass(self):
         class FalsyEG(ExceptionGroup):
             def __bool__(self):
-               return False
+                return False
 
             def derive(self, excs):
                 return FalsyEG(self.message, excs)



More information about the Python-checkins mailing list