fix: resolve SyntaxWarning invalid escape sequence in azure-mgmt-compute models#47102
Open
dcaayushd wants to merge 1 commit into
Open
fix: resolve SyntaxWarning invalid escape sequence in azure-mgmt-compute models#47102dcaayushd wants to merge 1 commit into
dcaayushd wants to merge 1 commit into
Conversation
…across compute and workloads SDKs
Contributor
|
Thank you for your contribution @dcaayushd! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates password complexity documentation strings across multiple Azure SDK model packages to properly escape the regex character class [\W_] in Python string literals.
Changes:
- Escape
\Was\\Win password complexity docs to avoid invalid escape sequences while preserving the intended rendered text. - Apply the same documentation fix consistently across multiple generated model files/packages.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/models/_models.py | Escapes \W in password regex doc text for OSProfile. |
| sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/models/_models_py3.py | Escapes \W in reST/:code: formatted password regex doc text for OSProfile (docstring and init). |
| sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py | Escapes \W in ManagedClusterWindowsProfile password regex doc text. |
| sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_models.py | Escapes \W in VirtualMachineScaleSetOSProfile password regex doc text. |
| sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/models/_models.py | Escapes \W in OSProfile password regex doc text. |
| sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_models.py | Escapes \W in several OSProfile-related password regex doc texts. |
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.
Fixes #47011
Python 3.12 raises
SyntaxWarning: invalid escape sequence '\W'when importingseveral Azure mgmt packages because docstrings contain
[\W_]— a regex patternwith an unescaped backslash in a regular string.
Fixed by replacing
[\W_]with[\\W_]in 10 occurrences across 7 generatedmodel files:
All SDK Contribution checklist: