SyntaxWarning: Invalid escape sequence \/ in `azure-mgmt-resource-deploymentstacks` 1.0.0

Aperta Adatta ai principianti
#50,155 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cloud

Direzione di ricerca

L'avviso proviene dalla docstring alla riga 119 di azure/mgmt/resource/deploymentstacks/models/_models.py, che contiene una barra rovesciata non escapata prima di una barra. Per riprodurre, importa il pacchetto con gli avvisi abilitati (ad esempio python -W error -c "import azure.mgmt.resource.deploymentstacks"). È completato quando l'import non emette alcuna SyntaxWarning. Il file è generato, quindi verifica se la correzione va fatta nell'output del generatore anziché nel file stesso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage
  • Package Name: azure-mgmt-resource-deploymentstacks
  • Package Version: 1.0.0
  • Operating System: macOS-27.0.1-arm64-arm-64bit-Mach-O
  • Python Version: 3.14.8

Describe the bug
https://github.com/Azure/azure-cli/issues/34237

The package emits a SyntaxWarning due to an invalid escape sequence \/ in the generated model file.

Warning message:

azure/mgmt/resource/deploymentstacks/models/_models.py:119:
SyntaxWarning: "\/" is an invalid escape sequence.
Such sequences will not work in the future.
Did you mean "\\/"? A raw string is also an option.

The warning originates from an unescaped backslash in a docstring in _models.py.

To Reproduce

Steps to reproduce the behavior:

  1. Install the package:
    pip install azure-mgmt-resource-deploymentstacks==1.0.0
    
  2. Import the package:
    from azure.mgmt.resource.deploymentstacks import DeploymentStacksClient
    
  3. Observe the SyntaxWarning emitted during import.

Expected behavior

The package should not emit any SyntaxWarning during import.

The invalid escape sequence should be properly escaped (\\) or the affected docstring should use a raw string.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
1g 22h
PR unite (30g)
189

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azure-sdk-for-python

Tutte le issue di Azure/azure-sdk-for-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.