1.1 --- a/inspector.py Tue Jun 29 22:41:05 2021 +0200
1.2 +++ b/inspector.py Tue Jun 29 23:50:13 2021 +0200
1.3 @@ -3,8 +3,7 @@
1.4 """
1.5 Inspect and obtain module structure.
1.6
1.7 -Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
1.8 - 2018, 2019 Paul Boddie <paul@boddie.org.uk>
1.9 +Copyright (C) 2007-2019, 2021 Paul Boddie <paul@boddie.org.uk>
1.10
1.11 This program is free software; you can redistribute it and/or modify it under
1.12 the terms of the GNU General Public License as published by the Free Software
1.13 @@ -78,13 +77,13 @@
1.14
1.15 ref = self.get_builtin("module")
1.16 self.set_name("__class__", ref)
1.17 - self.set_name("__name__", self.get_constant("string", self.name).reference())
1.18 - self.set_name("__file__", self.get_constant("string", filename).reference())
1.19 + self.set_name("__name__", self.get_constant("str", self.name).reference())
1.20 + self.set_name("__file__", self.get_constant("str", filename).reference())
1.21
1.22 # Reserve a constant for the encoding.
1.23
1.24 if self.encoding:
1.25 - self.get_constant("string", self.encoding)
1.26 + self.get_constant("str", self.encoding)
1.27
1.28 # Get module-level attribute usage details.
1.29
1.30 @@ -531,7 +530,7 @@
1.31 # Provide leafname, parent and context attributes.
1.32
1.33 parent, leafname = class_name.rsplit(".", 1)
1.34 - self.set_name("__name__", self.get_constant("string", leafname).reference())
1.35 + self.set_name("__name__", self.get_constant("str", leafname).reference())
1.36
1.37 if class_name != "__builtins__.core.function":
1.38 self.set_name("__parent__")
1.39 @@ -681,7 +680,7 @@
1.40
1.41 # Define a leafname attribute value for the function instance.
1.42
1.43 - ref = self.get_builtin_class("string")
1.44 + ref = self.get_builtin_class("str")
1.45 self.reserve_constant(function_name, name, ref.get_origin())
1.46
1.47 # Track attribute usage within the namespace.