Lines Matching +full:self +full:-
1 # coding=utf-8
2 # SPDX-License-Identifier: GPL-2.0
5 kernel-feat
8 Implementation of the ``kernel-feat`` reST-directive.
11 :copyright: Copyright (C) 2016-2019 Mauro Carvalho Chehab
12 :maintained-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
15 The ``kernel-feat`` (:py:class:`KernelFeat`) directive calls the
20 .. code-block:: rst
22 .. kernel-feat:: <ABI directory location>
29 Inserts a code-block with the *raw* reST. Sometimes it is helpful to see
50 app.add_directive("kernel-feat", KernelFeat)
59 u"""KernelFeat (``kernel-feat``) directive"""
70 def warn(self, message, **replace): argument
71 replace["fname"] = self.state.document.current_source
72 replace["line_no"] = replace.get("line_no", self.lineno)
73 message = ("%(fname)s:%(line_no)s: [kernel-feat WARN] : " + message) % replace
74 self.state.document.settings.env.app.warn(message, prefix="")
76 def run(self): argument
77 doc = self.state.document
79 raise self.warning("docutils: file insertion disabled")
88 '--enable-fname',
89 '--dir',
90 os.path.join(srctree, 'Documentation', self.arguments[0]),
93 if len(self.arguments) > 1:
94 args.extend(['--arch', self.arguments[1]])
96 … lines = subprocess.check_output(args, cwd=os.path.dirname(doc.current_source)).decode('utf-8')
112 nodeList = self.nestedParse(out_lines, self.arguments[0])
115 def nestedParse(self, lines, fname): argument
119 if "debug" in self.options:
120 code_block = "\n\n.. code-block:: rst\n :linenos:\n"
128 buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
130 with switch_source_input(self.state, content):
131 self.state.nested_parse(content, 0, node, match_titles=1)