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

Fix sphinx.add_lexer. #14934

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix sphinx.add_lexer. #14934

wants to merge 2 commits into from

Conversation

fossilet
Copy link

In sphinx version 4.0, support for lexer instances as an argument was removed:
https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_lexer

This would fix sphinx-build error about ql language.

In sphinx version 4.0, support for lexer instances as an argument was
removed:
https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_lexer
@jf205 jf205 added the ready-for-doc-review This PR requires and is ready for review from the GitHub docs team. label Nov 30, 2023
@felicitymay
Copy link
Contributor

Hi @fossilet 👋🏻

Many thanks for suggesting a fix for this warning in our Sphinx build process. When the tests run on this PR, we get the following failure, which suggests that the change might need to be larger. Do you have any thoughts?

Run ./build sphinx
mkdir -p "target/sphinx"
sphinx-build -a -E -q -W -b dirhtml ql/docs/codeql target/sphinx/codeql-docs

Exception occurred:
  File "/usr/lib/python3/dist-packages/pygments/__init__.py", line 48, in lex
    raise TypeError('lex() argument must be a lexer instance, '
TypeError: lex() argument must be a lexer instance, not a class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation ready-for-doc-review This PR requires and is ready for review from the GitHub docs team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants