20 + searchable_names = None
21 + searchable_versions = None
22 + if package_copy_job is not None:
23 + searchable_names = package_copy_job.package_name
24 + searchable_versions = [package_copy_job.package_version]
Could you make it clear that the non-PCJ case is handled when the PU[SBC] are created? Wouldn't it also make more sense to set searchable_names and searchable_versions to '' and [] respectively in the constructor, and then use the normal add mechanism with the PCJ data?
These look like they actually add, not set. It would also be nice to sort the sets (probably in _appendSearchables), so that this is all deterministic.
20 + searchable_names = None copy_job. package_ name copy_job. package_ version]
21 + searchable_versions = None
22 + if package_copy_job is not None:
23 + searchable_names = package_
24 + searchable_versions = [package_
Could you make it clear that the non-PCJ case is handled when the PU[SBC] are created? Wouldn't it also make more sense to set searchable_names and searchable_versions to '' and [] respectively in the constructor, and then use the normal add mechanism with the PCJ data?
74 + return self.store.find( id,), PackageUpload. searchable_ names == None, searchable_ versions == None, at).order_ by(PackageUploa d.id)
75 + (PackageUpload.
76 + PackageUpload.
77 + PackageUpload.id >= self.start_
I generally prefer to the start the conditions on the line after the findspec, so it's easier to scan.
443 + def setSearchableNa mes(self, names): _names = ' '.join( rchables( self.searchable _names, names)) rsions( self, versions): _versions = self._appendSea rchables( _versions, versions)
444 + self.searchable
445 + self._appendSea
446 +
447 + def setSearchableVe
448 + self.searchable
449 + self.searchable
These look like they actually add, not set. It would also be nice to sort the sets (probably in _appendSearchab les), so that this is all deterministic.