Text of codeql.github.com › codeql-query-help › python › py-use-of-apply as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

‘apply’ function used — CodeQL query help documentation

CodeQL query help documentation » CodeQL query help for Python » ‘apply’ function used ¶ ID: py/use-of-apply Kind: problem Security severity: Severity: warning Precision: very-high Tags: - maintainability Query suites: - python-security-and-quality.qls Click to see the query in the CodeQL repository The ‘apply’ function is deprecated and makes code harder to read as most Python programmers will not be familiar with it (it has been deprecated since 2003).

Recommendation ¶ Replace apply(function, args) with function(*args) . Replace apply(function, args, keywords) with function(*args, **keywords) . References ¶ Python Standard Library: apply . Python PEP-290: Code Migration and Modernization . © GitHub, Inc. Terms Privacy