]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove unused local variables in inspect.py (#24218)
authorYonatan Goldschmidt <yon.goldschmidt@gmail.com>
Sun, 27 Nov 2022 10:39:23 +0000 (12:39 +0200)
committerGitHub <noreply@github.com>
Sun, 27 Nov 2022 10:39:23 +0000 (16:09 +0530)
Lib/inspect.py

index d0015aa202044e17644179a652feedfc10de2d01..311a3f7e04b6a3d5661cd39e7baf4b0fcfefe9ca 100644 (file)
@@ -656,7 +656,7 @@ def classify_class_attrs(cls):
                 if name == '__dict__':
                     raise Exception("__dict__ is special, don't want the proxy")
                 get_obj = getattr(cls, name)
-            except Exception as exc:
+            except Exception:
                 pass
             else:
                 homecls = getattr(get_obj, "__objclass__", homecls)
@@ -1310,7 +1310,6 @@ def getargs(co):
     nkwargs = co.co_kwonlyargcount
     args = list(names[:nargs])
     kwonlyargs = list(names[nargs:nargs+nkwargs])
-    step = 0
 
     nargs += nkwargs
     varargs = None