Update ``licensish`` Rule or License using the mapping of ``ignorables`` attributes. Display progress messages if ``verbose`` is True.
(licensish, ignorables, verbose=False)
| 2892 | |
| 2893 | |
| 2894 | def set_ignorables(licensish, ignorables, verbose=False): |
| 2895 | """ |
| 2896 | Update ``licensish`` Rule or License using the mapping of ``ignorables`` |
| 2897 | attributes. |
| 2898 | |
| 2899 | Display progress messages if ``verbose`` is True. |
| 2900 | """ |
| 2901 | for key, value in ignorables.items(): |
| 2902 | if verbose: |
| 2903 | existing = getattr(licensish, key, None) |
| 2904 | print(f'Updating ignorable: {key} from: {existing!r} to: {value!r}') |
| 2905 | setattr(licensish, key, value) |
| 2906 | return licensish |
| 2907 | |
| 2908 | |
| 2909 | def get_ignorables(text, verbose=False): |