Some comments for config Sphinx
This commit is contained in:
parent
81ff7959f7
commit
2b8eff58ac
1 changed files with 5 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
# Add SRV to sys.path so autodoc can import packages
|
||||
# Для удобства импорта модулей из SRV
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
project = 'GONETS SRV'
|
||||
|
|
@ -28,7 +28,7 @@ napoleon_numpy_docstring = False
|
|||
|
||||
html_theme = 'furo'
|
||||
|
||||
# Source file parsers
|
||||
# Исходники структуры документации
|
||||
source_suffix = {
|
||||
'.rst': 'restructuredtext',
|
||||
}
|
||||
|
|
@ -37,29 +37,26 @@ master_doc = 'index'
|
|||
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Create _static if missing to silence warnings
|
||||
# Создание по умолчанию _static если не существует
|
||||
static_dir = os.path.join(os.path.dirname(__file__), '_static')
|
||||
os.makedirs(static_dir, exist_ok=True)
|
||||
|
||||
# Mock heavy/optional modules for RTD/local doc builds
|
||||
# Мокирование тяжёлых/опциональных модулей для RTD/локальной сборки документации
|
||||
autodoc_mock_imports = [
|
||||
'gi', 'pygobject',
|
||||
'pywifi', 'sdbus', 'sdbus_async', 'sdbus_async.networkmanager',
|
||||
'dbus', 'dbus.mainloop', 'dbus.mainloop.glib',
|
||||
'pydbus', 'mac_vendor_lookup',
|
||||
# mock problematic local modules when docs are built
|
||||
# мокирование проблемных локальных модулей при сборке документации
|
||||
'config.init_config',
|
||||
]
|
||||
|
||||
# Also prevent autosummary from importing mocked modules
|
||||
autosummary_mock_imports = autodoc_mock_imports
|
||||
|
||||
# Suppress noisy warnings for mocked objects
|
||||
suppress_warnings = [
|
||||
'autodoc.mocked_object',
|
||||
]
|
||||
|
||||
# Environment flag so code can short-circuit heavy side effects during import
|
||||
os.environ.setdefault('SPHINX_BUILD', '1')
|
||||
|
||||
autodoc_default_options = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue