Disable broken linting of literalinclude sphinx directive

Previously we were seeing:

AttributeError: 'Values' object has no attribute 'env'

TrivialFix
Change-Id: I2b376303a9fef8fb3c1ada0c168bbb494216aa94
This commit is contained in:
Will Szumski 2020-06-10 19:27:25 +01:00
parent fe4dea965d
commit c96803d8d1

View File

@ -17,6 +17,7 @@ import doc8.main
import sphinx.directives import sphinx.directives
import sphinx.directives.code import sphinx.directives.code
import sphinx.directives.patches import sphinx.directives.patches
from docutils.parsers.rst import directives as docutils_directives
def main(): def main():
@ -28,6 +29,9 @@ def main():
sphinx.directives.setup(app) sphinx.directives.setup(app)
sphinx.directives.code.setup(app) sphinx.directives.code.setup(app)
sphinx.directives.patches.setup(app) sphinx.directives.patches.setup(app)
# NOTE(wszumski): Disable broken literal include directive, please see:
# https://github.com/twolfson/restructuredtext-lint/issues/29
del docutils_directives._directives["literalinclude"]
return doc8.main.main() return doc8.main.main()