Repository navigation
Python: Update query help references to Python 3 - #23203
Open
SkyCipherr wants to merge 1 commit into
Open
SkyCipherr wants to merge 1 commit into
SkyCipherr wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Three active documentation findings remain: Python 2-specific references in the affected query help incorrectly point to Python 3 documentation, creating duplicate or non-supporting links.
3 open issues
What changed in this PR
Updates Python query-help documentation references from legacy Python 2 URLs to corresponding Python 3 documentation, including current section anchors, while retaining historical links for Python 2-specific behavior.
Changes:
- Refreshes language-reference, tutorial, standard-library, glossary, and FAQ links across 61 query-help files.
- Updates moved documentation anchors and obsolete HTTP URLs.
- Preserves references for Python 2-specific constructs such as old-style classes,
apply, and theprintstatement.
| File | Description |
|---|---|
| python/ql/src/Variables/UnusedModuleVariable.qhelp | Updates module and import tutorial references. |
| python/ql/src/Variables/UnusedLocalVariable.qhelp | Updates the assignment-statement reference. |
| python/ql/src/Variables/UninitializedLocal.qhelp | Updates FAQ and global-statement references. |
| python/ql/src/Variables/UndefinedGlobal.qhelp | Updates the modules tutorial reference. |
| python/ql/src/Variables/UndefinedExport.qhelp | Updates import and package-import references. |
| python/ql/src/Variables/ShadowBuiltin.qhelp | Updates built-in functions and types references. |
| python/ql/src/Variables/LeakingListComprehension.qhelp | Updates list-comprehension references. |
| python/ql/src/Statements/UnnecessaryPass.qhelp | Updates the pass statement reference. |
| python/ql/src/Statements/UnnecessaryElseClause.qhelp | Updates loop and else-clause references. |
| python/ql/src/Statements/UnnecessaryDelete.qhelp | Updates del and reference-counting references. |
| python/ql/src/Statements/TopLevelPrint.qhelp | Updates the modules tutorial reference while retaining the Python 2 print reference. |
| python/ql/src/Statements/SideEffectInAssert.qhelp | Updates the assert-statement reference. |
| python/ql/src/Statements/NonIteratorInForLoop.qhelp | Updates the iterator protocol reference. |
| python/ql/src/Statements/NestedLoopsSameVariableWithReuse.qhelp | Updates for-statement references. |
| python/ql/src/Statements/NestedLoopsSameVariable.qhelp | Updates for-statement references. |
| python/ql/src/Statements/ModificationOfLocals.qhelp | Updates for-statement references. |
| python/ql/src/Statements/MismatchInMultipleAssignment.qhelp | Updates assignment and introductory tutorial references. |
| python/ql/src/Statements/IterableStringOrSequence.qhelp | Updates iterator protocol references. |
| python/ql/src/Statements/C_StyleParentheses.qhelp | Updates the grammar specification reference. |
| python/ql/src/Statements/BreakOrReturnInFinally.qhelp | Updates try, break, and return references. |
| python/ql/src/Statements/AssertOnTuple.qhelp | Updates the assert-statement reference. |
| python/ql/src/Statements/AssertLiteralConstant.qhelp | Updates assert and compiled-file references. |
| python/ql/src/Security/CWE-776/XmlBomb.qhelp | Updates XML security documentation. |
| python/ql/src/Security/CWE-611/Xxe.qhelp | Updates XML security documentation. |
| python/ql/src/Metrics/TransitiveImports.qhelp | Updates the import-statement reference. |
| python/ql/src/Metrics/FNumberOfTests.qhelp | Updates the doctest reference. |
| python/ql/src/Metrics/FFunctionsAndMethods.qhelp | Updates the function-definition reference. |
| python/ql/src/Metrics/FClasses.qhelp | Updates the class-definition reference. |
| python/ql/src/Metrics/DirectImports.qhelp | Updates the import-statement reference. |
| python/ql/src/Imports/UnintentionalImport.qhelp | Updates import and modules references. |
| python/ql/src/Imports/ModuleLevelCyclicImport.qhelp | Updates import and modules references. |
| python/ql/src/Imports/ModuleImportsItself.qhelp | Updates the modules tutorial reference. |
| python/ql/src/Imports/ImportStarUsed.qhelp | Updates the import-statement reference. |
| python/ql/src/Imports/Imports.qhelp | Updates the import-statement reference. |
| python/ql/src/Imports/ImportandImportFrom.qhelp | Updates the import-statement reference. |
| python/ql/src/Imports/FromImportOfMutableAttribute.qhelp | Updates import and modules references. |
| python/ql/src/Imports/CyclicImport.qhelp | Updates import and modules references. |
| python/ql/src/Functions/ReturnValueIgnored.qhelp | Updates the function-definition reference. |
| python/ql/src/Functions/ReturnConsistentTupleSizes.qhelp | Updates the function-definition reference. |
| python/ql/src/Functions/NonSelf.qhelp | Updates the classes tutorial reference. |
| python/ql/src/Functions/NonCls.qhelp | Updates the classes tutorial reference. |
| python/ql/src/Functions/ExplicitReturnInInit.qhelp | Updates the __init__ reference. |
| python/ql/src/Expressions/WrongNumberArgumentsInCall.qhelp | Updates argument and parameter references. |
| python/ql/src/Expressions/WrongNameForArgumentInCall.qhelp | Updates argument and parameter references. |
| python/ql/src/Expressions/UnnecessaryLambda.qhelp | Updates the lambda-expression reference. |
| python/ql/src/Expressions/NonPortableComparisonUsingIs.qhelp | Updates the comparison reference. |
| python/ql/src/Expressions/NonCallableCalled.qhelp | Updates callable and __call__ references. |
| python/ql/src/Expressions/HashedButNoHash.qhelp | Updates the set-types reference. |
| python/ql/src/Expressions/Formatting/WrongNumberArgumentsFor3101Format.qhelp | Updates string-format syntax documentation. |
| python/ql/src/Expressions/Formatting/WrongNameInArgumentsFor3101Format.qhelp | Updates string-format syntax documentation. |
| python/ql/src/Expressions/Formatting/UnusedNamedArgumentIn3101Format.qhelp | Updates string-format syntax documentation. |
| python/ql/src/Expressions/Formatting/UnusedArgumentIn3101Format.qhelp | Updates string-format syntax documentation. |
| python/ql/src/Expressions/Formatting/MixedExplicitImplicitIn3101Format.qhelp | Updates string-format syntax documentation. |
| python/ql/src/Expressions/Comparisons/UselessComparisonTest.qhelp | Updates the comparison reference. |
| python/ql/src/Expressions/CompareIdenticalValuesMissingSelf.qhelp | Updates the comparison reference. |
| python/ql/src/Expressions/CompareIdenticalValues.qhelp | Updates comparison and numeric-library references. |
| python/ql/src/Expressions/CompareConstants.qhelp | Updates the comparison reference. |
| python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.qhelp | Updates argument, parameter, and class references. |
| python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.qhelp | Updates argument, parameter, and class references. |
| python/ql/src/Classes/ShouldBeContextManager.qhelp | Updates context-manager documentation. |
| python/ql/src/Classes/ConflictingAttributesInBaseClasses.qhelp | Updates the data-model reference. |
Review effort: Lite (adaptive)
| <li> | ||
| Python 2 standard library: | ||
| <a href="https://docs.python.org/2/library/xml.html#xml-vulnerabilities">XML Vulnerabilities</a>. | ||
| <a href="https://docs.python.org/3/library/xml.html#xml-security">XML Vulnerabilities</a>. |
| <li> | ||
| Python 2 standard library: | ||
| <a href="https://docs.python.org/2/library/xml.html#xml-vulnerabilities">XML Vulnerabilities</a>. | ||
| <a href="https://docs.python.org/3/library/xml.html#xml-security">XML Vulnerabilities</a>. |
Comment on lines
+36
to
+38
| <li>Python Tutorial: <a href="https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions">List Comprehensions</a>.</li> | ||
| <li>The History of Python: <a href="http://python-history.blogspot.co.uk/2010/06/from-list-comprehensions-to-generator.html">From List Comprehensions to Generator Expressions</a>.</li> | ||
| <li>Python Language Reference: <a href="https://docs.python.org/2/reference/expressions.html#list-displays">List displays</a>.</li> | ||
| <li>Python Language Reference: <a href="https://docs.python.org/3/reference/expressions.html#list-displays">List displays</a>.</li> |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Update 85 references in 61 Python query-help files to the equivalent Python 3 documentation. Some sections have moved, so the patch uses their current anchors. References that explain Python 2-specific behavior, such as old-style classes,
apply, and theprintstatement, still point to the historical documentation.Verified the HTTP response and fragment targets for all 44 distinct replacement URLs. Rendered all 61 changed pages with
codeql generate query-help --format=markdownand checked the rendered links.Fixes #18775.