-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add a trivial handler for :ref:
role when rendering CLI help
#3440
Conversation
cc5f92f
to
ace41d1
Compare
:ref:
role when rendering CLI help
Tried to render something for the
|
ace41d1
to
79afa3e
Compare
Should be addressed in 79afa3e |
79afa3e
to
2b55c06
Compare
@psss nice catch! pls re-review |
The Rawhide image was updated, restart the failing test /packit retest-failed |
@happz can you share which help should be improved? I am failing to find some example to verify how it looks |
It's used in |
Sphinx takes care of it when building (HTML) docs, but for CLI help, we need to provide a handler of our own. But even a simple one is enough.
2b55c06
to
e7f4aa2
Compare
Tried with a simple ref in the diff --git a/tmt/steps/discover/fmf.py b/tmt/steps/discover/fmf.py
index 2c4f5d6e..592af006 100644
--- a/tmt/steps/discover/fmf.py
+++ b/tmt/steps/discover/fmf.py
@@ -277,6 +277,8 @@ class DiscoverFmf(tmt.steps.discover.DiscoverPlugin[DiscoverFmfStepData]):
when you do not have write access to the remote test repository.
The value should follow the ``adjust`` rules syntax.
+ Hmmm :ref:`/spec/plans/prepare/feature`...
+
The following example adds an ``avc`` check for each discovered
test, doubles its duration and replaces each occurrence of the word
``python3.11`` in the list of required packages. Docs are successfully built and I can see the link in the
But there are also weird warnings when building the docs:
@happz, are you able to reproduce the problem? |
Hmmm, unfortunately, I am able to reproduce. It looks like some conflicts between how Sphinx sets up the ReST parser, and how we do it. Seems to me Sphinx's role handler is called instead of ours. |
Hopefully addressed in 478fcb4. I was unable to teach Sphinx some reason, both Sphinx and docutils rely on global, module-level variables I was unable to reasonably modify just for our code. So, skipping ReST rendering of docstrings CLI would emit while running under the control of Sphinx. |
All test failures are expected, see #3487 and rawhide is a known thing 1.41.1 in TF will fix |
Sphinx takes care of it when building (HTML) docs, but for CLI help, we need to provide a handler of our own. But even a simple one is enough.
Pull Request Checklist