-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
enhancementNew feature or requestNew feature or requestlspIssues that relate to the language serverIssues that relate to the language server
Milestone
Description
In light of #1051, it might be worth considering renaming the option esbonio.sphinx.buildCommand to one of
esbonio.sphinx.buildCommandArgumentesbonio.sphinx.buildArgumentsesbonio.sphinx.sphinxbuildArguments
because that's what it is used for, even the code discards a leading sphinx-build so the value is never intended to be run as a command.
lib/esbonio/esbonio/sphinx_agent/config.py line 79
@classmethod
def fromcli(cls, args: list[str]):
"""Return the ``SphinxConfig`` instance that's equivalent to the given arguments.
Parameters
----------
args
The cli arguments you would normally pass to ``sphinx-build``
Returns
-------
Optional[SphinxConfig]
``None`` if the arguments could not be parsed, otherwise the set configuration
options derived from the sphinx build command.
"""
if args[0] == "sphinx-build":
args = args[1:]
# The easiest way to handle this is to just call sphinx-build but with
# the Sphinx app object patched out - then we just use all the args it
# was given!
with mock.patch("sphinx.cmd.build.Sphinx") as m_Sphinx:
sphinx_build(args)For the record: This is the same as issue 1049, which you might or might not see as it got shadow banned by GitHub.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlspIssues that relate to the language serverIssues that relate to the language server
Type
Projects
Status
Todo