Skip to content

Commit

Permalink
scripts: Update scripts/sphinx-app.py
Browse files Browse the repository at this point in the history
Run `python -i scripts/sphinx-app.py` to easily get an Esbonio enabled
Sphinx application object to inspect
  • Loading branch information
alcarney committed Jan 14, 2024
1 parent b92090e commit a6dcc23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ repos:
rev: 7.0.0
hooks:
- id: flake8
exclude: 'scripts/sphinx-app.py'
args: [--config=lib/esbonio/setup.cfg]

- repo: https://github.com/pycqa/isort
Expand Down
9 changes: 4 additions & 5 deletions scripts/sphinx-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
>>> app
<sphinx.application.Sphinx object at 0x7f0ad0fdb5b0>
"""
import inspect
import pathlib
import time

from sphinx.application import Sphinx

from esbonio.lsp.sphinx import SphinxLanguageServer
from esbonio.sphinx_agent import types
from esbonio.sphinx_agent.app import Sphinx

root = pathlib.Path(__file__).parent.parent

Expand All @@ -46,5 +47,3 @@
freshenv=True, # Have Sphinx reload everything on first build.
)
app.build()
ls = SphinxLanguageServer()
ls.app = app

0 comments on commit a6dcc23

Please sign in to comment.