Re: [PATCH v2 06/12] scripts: lib: netlink_yml_parser.py: use classes
Donald Hunter <[email protected]>
| Newsgroups | dev.linux.lists.lkmm,dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
Mauro Carvalho Chehab <[email protected]> writes: > As we'll be importing netlink parser into a Sphinx extension, > move all functions and global variables inside two classes: > > - RstFormatters, containing ReST formatter logic, which are > YAML independent; > - NetlinkYamlParser: contains the actual parser classes. That's > the only class that needs to be imported by the script or by > a Sphinx extension. I suggest a third class for the doc generator that is separate from the yaml parsing. The yaml parsing should really be refactored to reuse tools/net/ynl/pyynl/lib/nlspec.py at some point. > With that, we won't pollute Sphinx namespace, avoiding any > potential clashes. > > Signed-off-by: Mauro Carvalho Chehab <[email protected]>