ui: delete local variables instead of setting to `None`
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 27 Dec 2019 18:51:45 -0500
changeset 43991 e3ce3731d621
parent 43990 37458d8b0c1e
child 43992 e52a9c85a7a8
ui: delete local variables instead of setting to `None` The previous code was flagged by PyCharm as an unused variable assignment. Differential Revision: https://phab.mercurial-scm.org/D7759
mercurial/ui.py
--- a/mercurial/ui.py	Fri Dec 27 18:50:40 2019 -0500
+++ b/mercurial/ui.py	Fri Dec 27 18:51:45 2019 -0500
@@ -2032,7 +2032,10 @@
             self.log(
                 b'develwarn', b'%s at: %s:%d (%s)\n', msg, fname, lineno, fmsg
             )
-            curframe = calframe = None  # avoid cycles
+
+            # avoid cycles
+            del curframe
+            del calframe
 
     def deprecwarn(self, msg, version, stacklevel=2):
         """issue a deprecation warning