Pacify mypy

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-11-03 14:49:12 +01:00
parent 3b9facd8ac
commit ce78200fb5

View File

@ -346,10 +346,13 @@ class MergeArtifactIssueTracker(LineIssueTracker):
return False return False
THIS_FILE_BASE_NAME = \ def this_location():
os.path.basename(inspect.getframeinfo(inspect.currentframe()).filename) frame = inspect.currentframe()
LINE_NUMBER_BEFORE_LICENSE_ISSUE_TRACKER = \ assert frame is not None
inspect.getframeinfo(inspect.currentframe()).lineno info = inspect.getframeinfo(frame)
return os.path.basename(info.filename), info.lineno
THIS_FILE_BASE_NAME, LINE_NUMBER_BEFORE_LICENSE_ISSUE_TRACKER = this_location()
class LicenseIssueTracker(LineIssueTracker): class LicenseIssueTracker(LineIssueTracker):
"""Check copyright statements and license indications. """Check copyright statements and license indications.