Changeset dfca4bc in rtems-central for rtemsqual


Ignore:
Timestamp:
Mar 17, 2020, 1:29:56 PM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
64987c4
Parents:
9144b6b
git-author:
Sebastian Huber <sebastian.huber@…> (03/17/20 13:29:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/17/20 15:32:43)
Message:

content: Add method to register license/copyrights

Location:
rtemsqual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/glossary.py

    r9144b6b rdfca4bc  
    6060                       key=lambda x: x["glossary-term"].lower()):
    6161        text = macro_to_sphinx.substitute(item["text"].strip())
    62         content.register_license(item["SPDX-License-Identifier"])
    63         for statement in item["copyrights"]:
    64             content.register_copyright(statement)
     62        item.register_license_and_copyrights(content)
    6563        content.add_definition_item(item["glossary-term"], text, indent=1)
    6664    content.add_licence_and_copyrights()
  • rtemsqual/items.py

    r9144b6b rdfca4bc  
    3232from typing import Any, List, Dict
    3333import yaml
     34
     35from rtemsqual.content import SphinxContent
    3436
    3537ItemList = List["Item"]
     
    7173        """ Adds a child to this item. """
    7274        self._children.append(child)
     75
     76    def register_license_and_copyrights(self, content: SphinxContent):
     77        """ Registers the license and copyrights of this item. """
     78        content.register_license(self["SPDX-License-Identifier"])
     79        for statement in self["copyrights"]:
     80            content.register_copyright(statement)
    7381
    7482
Note: See TracChangeset for help on using the changeset viewer.