Return a mapping of license data. ``include_field(name, value)`` is a callable that will be called with each name, value pair and returns True to include the field or False to filter it.
(self, include_field)
| 421 | return newl |
| 422 | |
| 423 | def _to_dict(self, include_field): |
| 424 | """ |
| 425 | Return a mapping of license data. |
| 426 | ``include_field(name, value)`` is a callable that will be called with |
| 427 | each name, value pair and returns True to include the field or False |
| 428 | to filter it. |
| 429 | """ |
| 430 | data = {} |
| 431 | for name, value in attr.asdict(self).items(): |
| 432 | if not include_field(name, value): |
| 433 | continue |
| 434 | data[name] = value |
| 435 | return data |
| 436 | |
| 437 | def to_dict( |
| 438 | self, |
no outgoing calls
no test coverage detected