[Python-checkins] Remove unnecessary pass statements (GH-27103)

ambv webhook-mailer at python.org
Tue Jul 13 09:02:38 EDT 2021


https://github.com/python/cpython/commit/62d55a4d11fe25e8981e27e68ba080ab47c3f590
commit: 62d55a4d11fe25e8981e27e68ba080ab47c3f590
branch: main
author: Elisha Hollander <just4now666666 at gmail.com>
committer: ambv <lukasz at langa.pl>
date: 2021-07-13T15:02:30+02:00
summary:

Remove unnecessary pass statements (GH-27103)

files:
M Lib/lib2to3/btm_utils.py
M Lib/multiprocessing/managers.py
M Lib/telnetlib.py

diff --git a/Lib/lib2to3/btm_utils.py b/Lib/lib2to3/btm_utils.py
index ff76ba3404707..b61afdba69307 100644
--- a/Lib/lib2to3/btm_utils.py
+++ b/Lib/lib2to3/btm_utils.py
@@ -220,7 +220,6 @@ def reduce_tree(node, parent=None):
             else:
                 #TODO: handle {min, max} repeaters
                 raise NotImplementedError
-                pass
 
         #add children
         if details_node and new_node is not None:
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index b981b0e1cb8ed..9c7e92faec942 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -1337,7 +1337,6 @@ def __init__(self, *args, **kwargs):
 
         def __del__(self):
             util.debug(f"{self.__class__.__name__}.__del__ by pid {getpid()}")
-            pass
 
         def get_server(self):
             'Better than monkeypatching for now; merge into Server ultimately'
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 8ce053e881a30..ae88ea594746f 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -489,7 +489,6 @@ def process_rawq(self):
         except EOFError: # raised by self.rawq_getchar()
             self.iacseq = b'' # Reset on EOF
             self.sb = 0
-            pass
         self.cookedq = self.cookedq + buf[0]
         self.sbdataq = self.sbdataq + buf[1]
 



More information about the Python-checkins mailing list