@@ -375,12 +375,11 @@ def parse(cls, location, package_only=True):
375
375
)
376
376
377
377
if (
378
- 'upstream_type'
379
- and 'name'
380
- and 'version'
381
- and 'licenses'
382
- and 'upstream_address'
383
- in metadata_fields
378
+ 'upstream_type' in metadata_fields
379
+ and 'name' in metadata_fields
380
+ and 'version' in metadata_fields
381
+ and 'licenses' in metadata_fields
382
+ and 'upstream_address' in metadata_fields
384
383
):
385
384
# TODO: Create function that determines package type from download URL,
386
385
# then create a package of that package type from the metadata info
@@ -397,16 +396,15 @@ def parse(cls, location, package_only=True):
397
396
yield models .PackageData .from_data (package_data , package_only = True )
398
397
399
398
if (
400
- 'package_type'
401
- and 'name'
402
- and 'version'
403
- and 'license_expression'
404
- and 'homepage_url'
405
- and 'download_url'
406
- and 'vcs_url'
407
- and 'download_archive_sha1'
408
- and 'vcs_commit_hash'
409
- in metadata_fields
399
+ 'package_type' in metadata_fields
400
+ and 'name' in metadata_fields
401
+ and 'version' in metadata_fields
402
+ and 'license_expression' in metadata_fields
403
+ and 'homepage_url' in metadata_fields
404
+ and 'download_url' in metadata_fields
405
+ and 'vcs_url' in metadata_fields
406
+ and 'download_archive_sha1' in metadata_fields
407
+ and 'vcs_commit_hash' in metadata_fields
410
408
):
411
409
package_data = dict (
412
410
datasource_id = cls .datasource_id ,
0 commit comments