Closes #12085: Add a file source view for reports

This commit is contained in:
jeremystretch
2023-03-29 16:58:35 -04:00
parent 715592547c
commit c4891fe105
6 changed files with 36 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import inspect
import logging
import traceback
from datetime import timedelta
@@ -127,6 +128,14 @@ class Report(object):
"""
return self.class_name
@property
def filename(self):
return inspect.getfile(self.__class__)
@property
def source(self):
return inspect.getsource(self.__class__)
#
# Logging methods
#