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

オープン 初心者向け
#50,155 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
cloud

調査の方向性

警告は azure/mgmt/resource/deploymentstacks/models/_models.py の119行目にある docstring から発生しています。そこにはスラッシュの前に、エスケープされていないバックスラッシュが含まれています。再現するには警告を有効にしてパッケージをインポートします(例: python -W error -c "import azure.mgmt.resource.deploymentstacks")。インポートで SyntaxWarning が出なければ完了です。このファイルは生成されるものなので、修正をファイル自体ではなくジェネレーターの出力側で行うべきかを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
5.6k
フォーク
3.4k
平均マージ
1日 22時間
マージ済み PR(30日)
189

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-sdk-for-python のほかの issue

Azure/azure-sdk-for-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。