From c96803d8d1974c87e0dca004b4e360d48ee0fe8f Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 10 Jun 2020 19:27:25 +0100 Subject: [PATCH] Disable broken linting of literalinclude sphinx directive Previously we were seeing: AttributeError: 'Values' object has no attribute 'env' TrivialFix Change-Id: I2b376303a9fef8fb3c1ada0c168bbb494216aa94 --- tools/sphinx8 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/sphinx8 b/tools/sphinx8 index 183eebf6d..ef978335b 100755 --- a/tools/sphinx8 +++ b/tools/sphinx8 @@ -17,6 +17,7 @@ import doc8.main import sphinx.directives import sphinx.directives.code import sphinx.directives.patches +from docutils.parsers.rst import directives as docutils_directives def main(): @@ -28,6 +29,9 @@ def main(): sphinx.directives.setup(app) sphinx.directives.code.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()