mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
Python: Improve docstring and make predicate private
This commit is contained in:
@@ -308,9 +308,12 @@ predicate hasContextmanagerDecorator(Function func) {
|
||||
* Holds if the function `func` has a `typing.overload` decorator.
|
||||
* Such functions are type stubs that declare an overload signature but are
|
||||
* not the actual implementation.
|
||||
*
|
||||
* Normally we would want to model this using API graphs for more precision, but since this
|
||||
* predicate is used in the call graph computation, we have to use a more syntactic approach.
|
||||
*/
|
||||
overlay[local]
|
||||
predicate hasOverloadDecorator(Function func) {
|
||||
private predicate hasOverloadDecorator(Function func) {
|
||||
exists(ControlFlowNode overload |
|
||||
overload.(NameNode).getId() = "overload" and overload.(NameNode).isGlobal()
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user