Skip to content

Commit

Permalink
adds line number to tracing tag of python functions to make them unique
Browse files Browse the repository at this point in the history
  • Loading branch information
christophkloeffel committed Jun 14, 2024
1 parent 2b8296c commit 86cd606
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lobster/tools/core/online_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def main():

rel_path_from_root = os.path.relpath(item.location.filename,
repo_root)
# pylint: disable=possibly-used-before-assignment
actual_repo = gh_root
actual_sha = options.commit
actual_path = rel_path_from_root
Expand Down
6 changes: 5 additions & 1 deletion lobster/tools/python/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def fqn(self):
rv = self.parent.fqn() + "."
else:
rv = ""
rv += self.name
if self.location.line is not None and \
isinstance(self, Python_Function):
rv += f"{self.name}:{str(self.location.line)}"
else:
rv += self.name
return rv

def lobster_tag(self):
Expand Down
1 change: 1 addition & 0 deletions lobster/tools/trlc/trlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ def main():
ok = False
if ok:
stab = sm.process()
# pylint: disable=possibly-used-before-assignment
if not ok or stab is None:
print("lobster-trlc: aborting due to earlier error")
return 1
Expand Down

0 comments on commit 86cd606

Please sign in to comment.