microsoft / microsoft/typespec

[python][typing]Need to escape '@' in docstring

Open
#5,841 0 comments 0 reactions 1 assignee Claimed by @msyyc View on GitHub
emitter:client:python
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

copied from https://github.com/Azure/autorest.python/issues/3036

If there is "'@" in docstring, we need to escape @ to avoid confusing sphinx.

e.g. https://github.com/Azure/azure-rest-api-specs/blob/main/specification/search/data-plane/Azure.Search/preview/2024-11-01-preview/searchindex.json#L1876

we want to generate the docstring as '\\\\@search.score'

It is only needed for the pattern "'@" (single quote mark + @) in docstring.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.