Skip to content
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

Identifier with trailing underscore #26

Open
opk12 opened this issue Apr 2, 2020 · 2 comments
Open

Identifier with trailing underscore #26

opk12 opened this issue Apr 2, 2020 · 2 comments

Comments

@opk12
Copy link

opk12 commented Apr 2, 2020

A variable name with a trailing underscore gives Unknown target name:

$  cat test.py 
def f(id_: str):
    """Function.

    :param id_: A string."""
    print()
$  flake8 test.py 
test.py:4:1: RST306 Unknown target name: "id".

Could this be related to sphinx issue 1462?

@peterjc
Copy link
Owner

peterjc commented Apr 2, 2020

Hmm. Reminds me of #18 in that this is some Python syntax which taken in isolation is invalid RST.

Can it be escaped as a workaround?

@shifqu
Copy link

shifqu commented Apr 30, 2021

I can confirm that escaping each reference to the identifier with a trailing underscore removes the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants