You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cfdeb0e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: python/ql/lib/semmle/python/AstExtended.qll
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,11 @@ class TypeParameter extends TypeParameter_, AstNode {
228
228
229
229
overrideAstNodegetAChildNode(){none()}
230
230
231
-
overrideScopegetScope(){none()}
231
+
overrideScopegetScope(){
232
+
// `TypeParameter`s are children of `TypeParameterList`s which are children of `Function`s, `ClassExpr`s, and `TypeAlias`es.
233
+
// For `TypeAlias`, this is not quite right. Instead, `TypeAlias`es should define their own scopes, cf. https://docs.python.org/3.12/reference/executionmodel.html#annotation-scopes
0 commit comments