Changeset - e79877ee6a3f
[Not reviewed]
0 3 0
Brett Smith - 4 years ago 2020-04-28 14:48:10
brettcsmith@brettcsmith.org
data: Add rt-id to LINK_METADATA.

This gets closer to our real intentions: anything that checks link
metadata should check rt-id. MetaRepoLinks is the exception, not
the rule, in ignoring rt-id.
3 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/data.py
Show inline comments
...
 
@@ -58,2 +58,3 @@ LINK_METADATA = frozenset([
 
    'receipt',
 
    'rt-id',
 
    'statement',
conservancy_beancount/plugin/meta_repo_links.py
Show inline comments
...
 
@@ -36,2 +36,3 @@ class MetaRepoLinks(core.TransactionHook):
 
    HOOK_GROUPS = frozenset(['linkcheck'])
 
    LINK_METADATA = data.LINK_METADATA.difference('rt-id')
 
    PATH_PUNCT_RE = re.compile(r'[:/]')
...
 
@@ -50,3 +51,3 @@ class MetaRepoLinks(core.TransactionHook):
 
        metadata = data.Metadata(meta)
 
        for key in data.LINK_METADATA:
 
        for key in self.LINK_METADATA:
 
            try:
conservancy_beancount/plugin/meta_rt_links.py
Show inline comments
...
 
@@ -34,3 +34,2 @@ class MetaRTLinks(core.TransactionHook):
 
    HOOK_GROUPS = frozenset(['linkcheck', 'network', 'rt'])
 
    LINK_METADATA = data.LINK_METADATA.union(['rt-id'])
 

	
...
 
@@ -48,3 +47,3 @@ class MetaRTLinks(core.TransactionHook):
 
        metadata = data.Metadata(meta)
 
        for key in self.LINK_METADATA:
 
        for key in data.LINK_METADATA:
 
            try:
0 comments (0 inline, 0 general)