Skip to content

Commit c514282

Browse files
authored
Merge pull request #8255 from tausbn/python-nomagic-pattern-getcase
Python: Prevent magic/inlining in `getCase`
2 parents 1181779 + 622b326 commit c514282

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/ql/lib/semmle/python/Patterns.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Pattern extends Pattern_, AstNode {
1010
override Scope getScope() { result = this.getCase().getScope() }
1111

1212
/** Gets the case statement containing this pattern */
13+
pragma[nomagic]
1314
Case getCase() { result.contains(this) }
1415

1516
override string toString() { result = "Pattern" }

0 commit comments

Comments
 (0)