Python: Improve docstring and make predicate private

This commit is contained in:
Taus
2026-03-09 13:41:38 +00:00
parent 66ca10c338
commit f2bad1e6e1

View File

@@ -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