MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / update_ignorables

Function update_ignorables

src/licensedcode/models.py:2876–2891  ·  view source on GitHub ↗

Update ignorables and return the ``licensish`` Rule or License using the latest values detected in its text. Display progress messages if ``verbose`` is True.

(licensish, verbose=False)

Source from the content-addressed store, hash-verified

2874
2875
2876def update_ignorables(licensish, verbose=False):
2877 """
2878 Update ignorables and return the ``licensish`` Rule or License using the
2879 latest values detected in its text.
2880
2881 Display progress messages if ``verbose`` is True.
2882 """
2883
2884 if verbose:
2885 print(f'Processing:', licensish.identifier)
2886
2887 text = licensish.text
2888 if text:
2889 ignorables = get_ignorables(text=text, verbose=verbose)
2890 set_ignorables(licensish=licensish, ignorables=ignorables, verbose=verbose)
2891 return licensish
2892
2893
2894def set_ignorables(licensish, ignorables, verbose=False):

Callers 1

create_ruleMethod · 0.90

Calls 2

get_ignorablesFunction · 0.85
set_ignorablesFunction · 0.85

Tested by

no test coverage detected