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

Đang mở Phù hợp với người mới
#50,155 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
cloud

Hướng nghiên cứu

Cảnh báo đến từ docstring ở dòng 119 của azure/mgmt/resource/deploymentstacks/models/_models.py, trong đó có một dấu gạch chéo ngược chưa được escape đứng trước dấu gạch chéo. Để tái hiện, hãy import package với cảnh báo được bật (ví dụ python -W error -c "import azure.mgmt.resource.deploymentstacks"). Hoàn thành khi việc import không phát ra SyntaxWarning nào. Tệp này được sinh tự động, vì vậy hãy kiểm tra xem bản sửa nên nằm trong đầu ra của generator thay vì ở chính tệp này hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
5.6k
Fork
3.4k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
189

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-python

Tất cả issue của Azure/azure-sdk-for-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.