Skip to content

Commit dc15e1f

Browse files
committed
try to mock decorator for docs
1 parent 585d41b commit dc15e1f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@
1717
import os
1818
import sys
1919
from unittest import mock
20+
from functools import wraps
21+
22+
def state_dec(f):
23+
@wraps(f)
24+
def wrapper(*args, **kwargs):
25+
return f(*args, **kwargs)
26+
return wrapper
2027

2128
MOCK_MODULES = ['sqlwhat.grammar.plsql.ast', 'sqlwhat', 'sqlwhat.sct_syntax']
2229
for mod_name in MOCK_MODULES:
23-
sys.modules[mod_name] = mock.Mock()
30+
sys.modules[mod_name] = mock.Mock(state_dec = state_dec)
2431

2532
# If extensions (or modules to document with autodoc) are in another directory,
2633
# add these directories to sys.path here. If the directory is relative to the

0 commit comments

Comments
 (0)