allow call as valid subscope for call scoped rules

This commit is contained in:
mr-tz
2024-11-14 11:33:45 +00:00
parent ec697c01f9
commit 03e4778620
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,8 @@
### New Features
- allow call as valid subscope for call scoped rules @mr-tz
### Breaking Changes
- remove support for Python 3.8 and use Python 3.10 as minimum now #1966 @mr-tz

View File

@@ -630,8 +630,8 @@ def build_statements(d, scopes: Scopes):
)
elif key == "call":
if all(s not in scopes for s in (Scope.FILE, Scope.PROCESS, Scope.THREAD)):
raise InvalidRule("call subscope supported only for the process and thread scopes")
if all(s not in scopes for s in (Scope.FILE, Scope.PROCESS, Scope.THREAD, Scope.CALL)):
raise InvalidRule("call subscope supported only for the process, thread, and call scopes")
if len(d[key]) != 1:
raise InvalidRule("subscope must have exactly one child statement")