-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text_signature and raw identifiers don't interact well #1285
Labels
Comments
roblabla
added a commit
to roblabla/pyo3
that referenced
this issue
Nov 19, 2020
roblabla
added a commit
to roblabla/pyo3
that referenced
this issue
Nov 19, 2020
roblabla
added a commit
to roblabla/pyo3
that referenced
this issue
Nov 19, 2020
roblabla
added a commit
to roblabla/pyo3
that referenced
this issue
Nov 19, 2020
roblabla
added a commit
to roblabla/pyo3
that referenced
this issue
Nov 19, 2020
davidhewitt
pushed a commit
to roblabla/pyo3
that referenced
this issue
Nov 20, 2020
kngwyu
added a commit
that referenced
this issue
Nov 20, 2020
Fix #1285, text_signature and raw ident interaction
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Reports
The
text_signature
attributes automatically sets the first line of the python documentation to the function signature, which is supposed to befnname(arg1, arg2)
. However, this seems to interact badly with rust's raw identifiers. For instance, a methods defined like this:Will have a signature of
r#match()
instead of the correctmatch()
. This breaks several tools, like sphinx documentation generation.wrongly documents match's signature as
r#match()
instead of simplymatch()
. Python script showcasing the issue:🌍 Environment
rustc --version
): 1.47.0version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: yes, same issue.💥 Reproducing
Here's a quick script that will quickly reproduce the bug. It creates a simple pyo3 module with the
r#match
method and tries to access its help text.This script should eventually show:
The text was updated successfully, but these errors were encountered: