Merge pull request #20038 from joefarebrother/python-qual-comparison

Python: Modernize 3 quality queries for comparison methods
This commit is contained in:
Joe Farebrother
2025-08-28 09:37:20 +01:00
committed by GitHub
49 changed files with 549 additions and 556 deletions

View File

@@ -91,6 +91,12 @@ class Class extends Class_, Scope, AstNode {
/** Gets a method defined in this class */
Function getAMethod() { result.getScope() = this }
/** Gets the method defined in this class with the specified name, if any. */
Function getMethod(string name) {
result = this.getAMethod() and
result.getName() = name
}
override Location getLocation() { py_scope_location(result, this) }
/** Gets the scope (module, class or function) in which this class is defined */