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
WARNING: py:class reference target not found: .. #8127
Comments
Changing to async def trio_main(
self,
async_fn: typing.Callable[Ellipsis, typing.Awaitable[None]],
args: typing.Tuple[object, Ellipsis],
) -> None: Still results in the same output, even still with
Other substitutes like |
I don't know if this will provide any useful context but So I tried Just in case this offers any insight... This is the result of just messing around so nothing has been committed. If valuable I can provide it of course. |
Suggesting a workaround until the issue is fixed. In your from docutils.nodes import Text
from sphinx.ext.intersphinx import missing_reference
def setup(app):
app.connect("missing-reference", __sphinx_issue_8127)
def __sphinx_issue_8127(app, env, node, contnode):
reftarget = node.get("reftarget", None)
if reftarget == "..":
node["reftype"] = "data"
node["reftarget"] = "Ellipsis"
text_node = next(iter(contnode.traverse(lambda n: n.tagname == "#text")))
replacement_node = Text("...", "")
if text_node.parent is not None:
text_node.parent.replace(text_node, replacement_node)
else: # e.g. happens in rtype fields
contnode = replacement_node
return missing_reference(app, env, node, contnode) This will rewrite all the |
I reproduced the error with the following mark-up:
|
…t-picky warning On parsing the types, the leading dot of the ellipsis (...) is considered as a reference name. And its first dot is considered as a notation for relative type reference (ex. ".ClassName"). As a result, it was converted double dots unexpectedly. This changes the parsing rule to treat the ellipsis as a symbol, not a name.
Fix #8127: py domain: Ellipsis in info-field-list causes nit-picky warning
Describe the bug
I think this might be referring to the ellipsis but I'm not sure at present.
https://github.com/altendky/qtrio/blob/661520c1442556016e328169c81c7cd3bdc7f7c3/qtrio/_core.py#L556-L560
Note that I've already tracked the other warnings (outcomes and event type) to other issues.
This time I did remember to try latest 3.x (f861b4c). It showed the same issue.
To Reproduce
Steps to reproduce the behavior:
Steps with output including complete traceback
altendky@p1:~/repos/preqtrio/tmp/qtrio$ python3.8 -m venv venv
altendky@p1:~/repos/preqtrio/tmp/qtrio$ venv/bin/pip freeze alabaster==0.7.12 async-generator==1.10 attrs==19.3.0 Babel==2.8.0 certifi==2020.6.20 chardet==3.0.4 click==7.1.2 click-default-group==1.2.2 decorator==4.4.2 docutils==0.16 idna==2.10 imagesize==1.2.0 incremental==17.5.0 iniconfig==1.0.1 Jinja2==2.11.2 MarkupSafe==1.1.1 more-itertools==8.4.0 outcome==1.0.1 packaging==20.4 pluggy==0.13.1 py==1.9.0 Pygments==2.6.1 pyparsing==2.4.7 PySide2==5.15.0 pytest==6.0.1 pytz==2020.1 QtPy==1.9.0 qtrio @ file:///home/altendky/repos/preqtrio/tmp/qtrio requests==2.24.0 shiboken2==5.15.0 six==1.15.0 sniffio==1.1.0 snowballstemmer==2.0.0 sortedcontainers==2.2.2 Sphinx==3.2.1 sphinx-autodoc-typehints==1.11.0 sphinx-qt-documentation==0.3 sphinx-rtd-theme==0.5.0 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 sphinxcontrib-trio==1.1.2 toml==0.10.1 towncrier==19.9.0rc1 trio==0.16.0 urllib3==1.25.10
Expected behavior
I'm not completely sure but at least a reference to a specific thing in my code. If it is referring to the ellipsis then perhaps it just shouldn't have an issue at all. I'm guessing it should just be a plain
...
in the output. It could link to https://docs.python.org/3/library/constants.html#Ellipsis but that doesn't really describe it's meaning in typing and the generic type for which it is a parameter would already be linked.Your project
altendky/qtrio#146
Environment info
The text was updated successfully, but these errors were encountered: