Temporary vertion with non-working enchant

This commit is contained in:
Степаненко Ольга
2021-03-18 17:03:30 +03:00
parent 10e341fcbb
commit 0a7b4fb1a7
3 changed files with 70 additions and 42 deletions

View File

@@ -37,10 +37,7 @@ ManagerDescriptor.__get__ = lambda self, *args, **kwargs: self.manager
from django.db.models.query import QuerySet
QuerySet.__repr__ = lambda self: self.__class__.__name__
# try:
# import enchant # NoQA
# except ImportError:
# enchant = None
django.setup()
@@ -117,17 +114,12 @@ def skip_queryset(app, what, name, obj, skip, options):
return True
return skip
def process_signature(app, what, name, obj, options, signature, return_annotation):
return None
def setup(app):
# Register the docstring processor with sphinx
app.connect('autodoc-process-docstring', process_django_models)
app.connect('autodoc-skip-member', skip_queryset)
if enchant is not None:
app.connect('autodoc-process-docstring', process_modules)
app.connect('autodoc-process-signature', process_signature)
app.connect('autodoc-process-docstring', process_modules)
@@ -191,6 +183,7 @@ intersphinx_mapping = {
autodoc_default_flags = ['members']
# spell checking
print(enchant.list_languages())
spelling_lang = 'ru_RU'
tokenizer_lang = 'ru_RU'
spelling_word_list_filename = ['spelling_wordlist.txt', 'another_list.txt']
@@ -209,7 +202,6 @@ spelling_ignore_contributor_names=True
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
set_type_checking_flag = True
typehints_fully_qualified = True
always_document_param_types = True