]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/conf: disable "undefined name" warning from flake8
authorKefu Chai <kchai@redhat.com>
Fri, 20 Nov 2020 03:04:43 +0000 (11:04 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 20 Nov 2020 04:59:22 +0000 (12:59 +0800)
"tags" is exposed by sphinx, so we will have access to this variable
when sphinx imports this file. this silences the warning from flake8:

undefined name 'tags' [F821]

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/conf.py

index f8715e8e6f5a43d19c97428cf47fe847bd909ce4..208a2640ae5a6c4021c96ea9c9d5bc35e3318f44 100644 (file)
@@ -12,7 +12,7 @@ templates_path = ['_templates']
 source_suffix = '.rst'
 master_doc = 'index'
 exclude_patterns = ['**/.#*', '**/*~', 'start/quick-common.rst', '**/*.inc.rst']
-if tags.has('man'):
+if tags.has('man'):             # noqa: F821
     master_doc = 'man_index'
     exclude_patterns += ['index.rst', 'architecture.rst', 'glossary.rst', 'release*.rst',
                          'api/*',