]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove trailing spaces (GH-31695)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 5 Mar 2022 15:47:00 +0000 (17:47 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Mar 2022 15:47:00 +0000 (17:47 +0200)
13 files changed:
Lib/asyncio/sslproto.py
Lib/asyncio/transports.py
Lib/codeop.py
Lib/concurrent/futures/_base.py
Lib/importlib/_bootstrap_external.py
Lib/test/test_asyncio/test_sendfile.py
Lib/test/test_syntax.py
Lib/test/test_tokenize.py
Lib/test/test_typing.py
Modules/_blake2/blake2s_impl.c
Python/fileutils.c
Python/specialize.c
Tools/scripts/freeze_modules.py

index de7c3332e4dca34ea0cd0f67f5f450d81c9e8533..de00953cc1d0f7f49fea42a2eb0fc4fde2d2aa99 100644 (file)
@@ -197,8 +197,8 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
         return self._ssl_protocol._get_read_buffer_size()
 
     def get_write_buffer_limits(self):
-        """Get the high and low watermarks for write flow control. 
-        Return a tuple (low, high) where low and high are 
+        """Get the high and low watermarks for write flow control.
+        Return a tuple (low, high) where low and high are
         positive number of bytes."""
         return self._ssl_protocol._transport.get_write_buffer_limits()
 
index 73b1fa2de416c7012518df6306ba0845e49d3eaf..30fd41d49af71ff4594a88f67df96692d9ebea41 100644 (file)
@@ -100,8 +100,8 @@ class WriteTransport(BaseTransport):
         raise NotImplementedError
 
     def get_write_buffer_limits(self):
-        """Get the high and low watermarks for write flow control. 
-        Return a tuple (low, high) where low and high are 
+        """Get the high and low watermarks for write flow control.
+        Return a tuple (low, high) where low and high are
         positive number of bytes."""
         raise NotImplementedError
 
index 568e9bbc118050d68f4b06e156f10c63a23496ba..45a378baba43371be6cf105a80f200a85e35a151 100644 (file)
@@ -43,7 +43,7 @@ __all__ = ["compile_command", "Compile", "CommandCompiler"]
 # The following flags match the values from Include/cpython/compile.h
 # Caveat emptor: These flags are undocumented on purpose and depending
 # on their effect outside the standard library is **unsupported**.
-PyCF_DONT_IMPLY_DEDENT = 0x200          
+PyCF_DONT_IMPLY_DEDENT = 0x200
 PyCF_ALLOW_INCOMPLETE_INPUT = 0x4000
 
 def _maybe_compile(compiler, source, filename, symbol):
index c5912c24a1c20c9689747db8b84fdf8f66624fe9..706a4f2c09d1fd65f58184ee306fe6f8a99d5ef6 100644 (file)
@@ -282,7 +282,7 @@ def wait(fs, timeout=None, return_when=ALL_COMPLETED):
         A named 2-tuple of sets. The first set, named 'done', contains the
         futures that completed (is finished or cancelled) before the wait
         completed. The second set, named 'not_done', contains uncompleted
-        futures. Duplicate futures given to *fs* are removed and will be 
+        futures. Duplicate futures given to *fs* are removed and will be
         returned only once.
     """
     fs = set(fs)
index 529ca5a295178e8dd735cae7d926c56ef23af8af..741247dd25d638532044e41d25d99cfa427ccd6d 100644 (file)
@@ -390,7 +390,7 @@ _code_type = type(_write_atomic.__code__)
 #     Python 3.11a5 3481 (Use inline cache for BINARY_OP)
 #     Python 3.11a5 3482 (Use inline caching for UNPACK_SEQUENCE and LOAD_GLOBAL)
 #     Python 3.11a5 3483 (Use inline caching for COMPARE_OP and BINARY_SUBSCR)
-#     Python 3.11a5 3484 (Use inline caching for LOAD_ATTR, LOAD_METHOD, and 
+#     Python 3.11a5 3484 (Use inline caching for LOAD_ATTR, LOAD_METHOD, and
 #                         STORE_ATTR)
 #     Python 3.11a5 3485 (Add an oparg to GET_AWAITABLE)
 
index effca6644c062eb9d047499b43361a7df8e4294e..a10504b1c4130e38ded29397591ec76afeb3e80b 100644 (file)
@@ -93,8 +93,8 @@ class MyProto(asyncio.Protocol):
 class SendfileBase:
 
     # 256 KiB plus small unaligned to buffer chunk
-    # Newer versions of Windows seems to have increased its internal 
-    # buffer and tries to send as much of the data as it can as it 
+    # Newer versions of Windows seems to have increased its internal
+    # buffer and tries to send as much of the data as it can as it
     # has some form of buffering for this which is less than 256KiB
     # on newer server versions and Windows 11.
     # So DATA should be larger than 256 KiB to make this test reliable.
index 8ddfe91a6e12769d6b948710121f7794ff6484a0..5134dcbe6521c11991d9d18a0c80b2a55cc42269 100644 (file)
@@ -1630,8 +1630,8 @@ def fib(n):
             self.assertEqual(compile(s1, '<string>', 'exec'), compile(s2, '<string>', 'exec'))
         except SyntaxError:
             self.fail("Indented statement over multiple lines is valid")
-    
-    def test_continuation_bad_indentation(self): 
+
+    def test_continuation_bad_indentation(self):
         # Check that code that breaks indentation across multiple lines raises a syntax error
 
         code = r"""\
index 334390abaa2de6f0b6fe6bd337cd1d553d38a2ad..1272e1e9be002e4ab35fd8a9b35c2ceb98546ace 100644 (file)
@@ -2511,8 +2511,8 @@ async def f():
 
         self.assertRaises(SyntaxError, get_tokens, "("*1000+"a"+")"*1000)
         self.assertRaises(SyntaxError, get_tokens, "]")
-    
-    def test_continuation_lines_indentation(self): 
+
+    def test_continuation_lines_indentation(self):
         def get_tokens(string):
             return [(kind, string) for (kind, string, *_) in _generate_tokens_from_c_tokenizer(string)]
 
@@ -2551,7 +2551,7 @@ async def f():
                 '''Print a Fibonacci series up to n.'''
                 a, b = 0, 1
         """)
-        
+
         self.assertEqual(get_tokens(code), get_tokens(code_no_cont))
 
         code = dedent("""
@@ -2572,7 +2572,7 @@ async def f():
             pass
             pass
         """)
-        
+
         self.assertEqual(get_tokens(code), get_tokens(code_no_cont))
 
         code = dedent("""
@@ -2609,7 +2609,7 @@ async def f():
         """)
 
         self.assertEqual(get_tokens(code), get_tokens(code_no_cont))
+
 
 if __name__ == "__main__":
     unittest.main()
index bd9920436223cef3ebb5c69b3e096f6f2ad7a208..86baed98fcab1356a88a7305a9715a646cf349ba 100644 (file)
@@ -2930,8 +2930,8 @@ class ForwardRefTests(BaseTestCase):
 
     def test_forward_repr(self):
         self.assertEqual(repr(List['int']), "typing.List[ForwardRef('int')]")
-        self.assertEqual(repr(List[ForwardRef('int', module='mod')]), 
-                         "typing.List[ForwardRef('int', module='mod')]")       
+        self.assertEqual(repr(List[ForwardRef('int', module='mod')]),
+                         "typing.List[ForwardRef('int', module='mod')]")
 
     def test_union_forward(self):
 
index 763c0178e6bcd518a839bcefe79092e134827dde..4812730bd8ef436fc715696743d394055b90e60c 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 
 #include "Python.h"
-#include "pycore_strhex.h"        // _Py_strhex()
+#include "pycore_strhex.h"       // _Py_strhex()
 
 #include "../hashlib.h"
 #include "blake2ns.h"
@@ -37,6 +37,7 @@
 #include "impl/blake2s-ref.c"
 #endif
 
+
 extern PyType_Spec blake2s_type_spec;
 
 typedef struct {
index 9a71b83f45578a469174e61d313b9927664570a9..111d7fa84b188266d99eaacccbf22c6337a3fee1 100644 (file)
@@ -2093,7 +2093,7 @@ join_relfile(wchar_t *buffer, size_t bufsize,
              const wchar_t *dirname, const wchar_t *relfile)
 {
 #ifdef MS_WINDOWS
-    if (FAILED(PathCchCombineEx(buffer, bufsize, dirname, relfile, 
+    if (FAILED(PathCchCombineEx(buffer, bufsize, dirname, relfile,
         PATHCCH_ALLOW_LONG_PATHS))) {
         return -1;
     }
index 6328f11f90407a9cc4c34dc2fcf8cd0cdb088c66..417eece88b86a5efeb7237f74dca354e5c8ff4be 100644 (file)
@@ -1077,7 +1077,7 @@ _Py_Specialize_LoadMethod(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
     PyTypeObject *owner_cls = Py_TYPE(owner);
 
     if (PyModule_CheckExact(owner)) {
-        assert(INLINE_CACHE_ENTRIES_LOAD_ATTR <= 
+        assert(INLINE_CACHE_ENTRIES_LOAD_ATTR <=
                INLINE_CACHE_ENTRIES_LOAD_METHOD);
         int err = specialize_module_load_attr(owner, instr, name, LOAD_METHOD,
                                               LOAD_METHOD_MODULE);
index 0dc61e2fe32b227b93858ad9f5a58fb3f97252fa..c8d8a7dd1fbab72daf607f9a62929ea313b89219 100644 (file)
@@ -18,7 +18,7 @@ ROOT_DIR = os.path.abspath(ROOT_DIR)
 FROZEN_ONLY = os.path.join(ROOT_DIR, 'Tools', 'freeze', 'flag.py')
 
 STDLIB_DIR = os.path.join(ROOT_DIR, 'Lib')
-# If FROZEN_MODULES_DIR or DEEPFROZEN_MODULES_DIR is changed then the 
+# If FROZEN_MODULES_DIR or DEEPFROZEN_MODULES_DIR is changed then the
 # .gitattributes and .gitignore files needs to be updated.
 FROZEN_MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'frozen_modules')
 DEEPFROZEN_MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'deepfreeze')
@@ -732,4 +732,4 @@ def main():
 
 
 if __name__ == '__main__':
-    main()    
+    main()