Describe the bug
When running the azure-cli on macOS (Homebrew install), Python shows SyntaxWarning messages about invalid escape sequences in docstrings within the azure.batch.models._models.py file.
Related command
az login
Errors
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: invalid escape sequence '\ '
"""The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: invalid escape sequence '\ '
using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / are
Issue script & Debug output
Not sure this step is necessary for a syntax error telling the line number.
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: invalid escape sequence '\ '
"""The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
/opt/homebrew/Cellar/azure-cli/2.75.0/libexec/lib/python3.12/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: invalid escape sequence '\ '
using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / are
Expected behavior
No SyntaxWarning should appear. Backslashes in docstrings should be escaped (\\) or the string should be marked as a raw string (r'...').
Expected behavior
No SyntaxWarning should appear. Backslashes in docstrings should be escaped (\) or the string should be marked as a raw string (r'...').
Environment Summary
macOS Sequoia 15.5 (24F74)
Python 3.12
Azure CLI installed via Homebrew (azure-cli/2.75.0)
Additional context
This is a docstring only — so there’s no runtime breakage. It just clutters the output with warnings.
Describe the bug
When running the
azure-clion macOS (Homebrew install), Python shows SyntaxWarning messages about invalid escape sequences indocstringswithin theazure.batch.models._models.pyfile.Related command
az loginErrors
Issue script & Debug output
Not sure this step is necessary for a syntax error telling the line number.
Expected behavior
No SyntaxWarning should appear. Backslashes in docstrings should be escaped (\) or the string should be marked as a raw string (r'...').
Environment Summary
macOS Sequoia 15.5 (24F74)
Python 3.12
Azure CLI installed via Homebrew (azure-cli/2.75.0)
Additional context
This is a docstring only — so there’s no runtime breakage. It just clutters the output with warnings.