I was back and forth on that issue. Also, I’m not fully convinced that the
returning tuples is the right thing to do. It might be better to create a
class called “Inclusion” that explicitly names the including file, included
file, location, depth, etc.
Yeah, I haven’t looked closely, but I think it might make sense to have a class.
Let me rewrite that and post a new patch for consideration.
Here’s a 2nd take on the file inclusions patch. The includes property is now a get_includes function. I’ve added a class FileInclusion that provides a) the source (including) file, the target (included) file, location, depth, and a property for determining if the inclusion is the “input file.”
I’m not sure about the name of the class or attributes. They make sense to me, but there may be more appropriate names.
py.diff (7.46 KB)