Skip to content

Commit 663202e

Browse files
committed
refactor: Drop global config data_render_debug
1 parent 2f56f6e commit 663202e

3 files changed

Lines changed: 2 additions & 37 deletions

File tree

src/sphinxnotes/data/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@
3434
ExtraContextGenerator,
3535
)
3636
from .examples.strict import StrictDataDefineDirective
37-
from .config import Config
3837

3938
if TYPE_CHECKING:
4039
from sphinx.application import Sphinx
4140

4241

4342
"""Python API for other Sphinx extesions."""
4443
__all__ = [
45-
'Config',
4644
'Registry',
4745
'PlainValue',
4846
'Value',
@@ -81,10 +79,9 @@ def extra_context(cls) -> ExtraContextRegistry:
8179
def setup(app: Sphinx):
8280
meta.pre_setup(app)
8381

84-
from . import config, render
82+
from . import render
8583
from .examples import datadomain
8684

87-
config.setup(app)
8885
render.setup(app)
8986
datadomain.setup(app)
9087

src/sphinxnotes/data/config.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/sphinxnotes/data/render/datanodes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
Reporter,
1616
find_nearest_block_element,
1717
)
18-
from ..config import Config
1918

2019
if TYPE_CHECKING:
2120
from typing import Any, Callable
@@ -145,7 +144,7 @@ def render(self, host: Host) -> None:
145144
# TODO: set_source_info?
146145
self += ns
147146

148-
if self.template.debug or Config.render_debug:
147+
if self.template.debug:
149148
self += report
150149

151150
Reporter(self).clear_empty()

0 commit comments

Comments
 (0)