Update in-place every package mapping in the `packages` list by updating or creating the the "files" attribute from the `resource`. Yield back the packages.
(packages, resource)
| 442 | |
| 443 | |
| 444 | def add_files(packages, resource): |
| 445 | """ |
| 446 | Update in-place every package mapping in the `packages` list by updating or |
| 447 | creating the the "files" attribute from the `resource`. Yield back the |
| 448 | packages. |
| 449 | """ |
| 450 | for package in packages: |
| 451 | files = package['files'] = package.get('files') or [] |
| 452 | fil = resource.to_dict(skinny=True) |
| 453 | if fil not in files: |
| 454 | files.append(fil) |
| 455 | yield package |
| 456 | |
| 457 | |
| 458 | def package_tallies(resource, children, keep_details=False): |
no test coverage detected