diff mbox series

[v2,2/2] codegen: cleanup deprecated AST usages

Message ID 20231023164613.1441846-2-chris.laplante@agilent.com
State Accepted, archived
Commit 92be21cde6fa40d6ba5768bd09dcc77b2efe3df8
Headers show
Series [v2,1/2] codeparser/utils: clean up more deprecated AST usages | expand

Commit Message

chris.laplante@agilent.com Oct. 23, 2023, 4:46 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

This code is just completely dead as of Python 3.8, like the comment
says.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 lib/codegen.py | 12 ------------
 1 file changed, 12 deletions(-)
diff mbox series

Patch

diff --git a/lib/codegen.py b/lib/codegen.py
index 6955a7ada5..018b283177 100644
--- a/lib/codegen.py
+++ b/lib/codegen.py
@@ -392,19 +392,7 @@  class SourceGenerator(NodeVisitor):
     def visit_Name(self, node):
         self.write(node.id)
 
-    def visit_Str(self, node):
-        self.write(repr(node.s))
-
-    def visit_Bytes(self, node):
-        self.write(repr(node.s))
-
-    def visit_Num(self, node):
-        self.write(repr(node.n))
-
     def visit_Constant(self, node):
-        # Python 3.8 deprecated visit_Num(), visit_Str(), visit_Bytes(),
-        # visit_NameConstant() and visit_Ellipsis(). They can be removed once we
-        # require 3.8+.
         self.write(repr(node.value))
 
     def visit_Tuple(self, node):