In dataclasses.py
line 218 there's the Source
class with the contents
method.
This method returns the self.line
line from the self.parent.root.files.filepath(self.parent.root_module.id)
file.
In my case, the line number is beyond the number of lines of the file and the handler crashes.
Upon inspection I found that the file in self.parent.root.files
just contains a bunch of imports, but self
refers to one of the imported files.
self.line
and self.character
really refer to the file in self.file_name
, which is NOT the file retrieved from self.parent.root.files
.
self.file_name
is not in the list returned by self.parent.root.files
.
Thanks!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too