CodeQL library for Python
codeql/python-all 2.1.1-dev (changelog, source)
Search

Predicate isClassmethod

Holds if the function func is a classmethod – either by having a @classmethod decorator or by convention (like a __new__ method on a class is a classmethod even without the decorator).

Import path

import semmle.python.dataflow.new.internal.DataFlowDispatch
predicate isClassmethod(Function func)