ALBS-987: Generate i686 and dev repositories with pungi on building new distr. version automatically #15
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ALBS-987"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -157,1 +155,3 @@
(package_info["name"], package_info["version"], package_info["release"])
if package_info['epoch'] is not None:
epoch_suffix = ':' + package_info['epoch']
else:
unnecessary
else
statement, you can declareepoch_suffix
beforeif
statement@ -101,0 +135,4 @@
repo_info.path + '/',
repo_info.folder,
)
else:
same
@ -172,2 +214,4 @@
'repodata/repomd.xml'
)
repomd_file_path = self.get_remote_file_content(repomd_file_path)
else:
same
@ -270,0 +303,4 @@
full_repo_path = self._get_full_repo_path(repo_info)
if full_repo_path in self.pkgs:
return self.pkgs[full_repo_path]
else:
same
@ -313,0 +329,4 @@
) -> str:
if package.arch in self.repo_arches[variant_arch]:
return package.arch
else:
same
@ -313,0 +379,4 @@
for package in self.get_packages_iterator(repo_info=repo_info):
if self.is_skipped_module_package(package):
continue
if self.is_excluded_package(
those
if
statements can be unitedIt's splitted for more readable code.
@ -368,0 +405,4 @@
package_info['is_reference'] == is_reference and \
self.compare_pkgs_version(
package_1=package,
package_2=package_info['package'],
wrong indents
Pycharm didn't agree with you)
btw, even if linter doesn't show any warnings about indents, it looks wierd, because indents for function arguments supposed to be like this
I prefer to use
black
for code formatting, here is an example of black formatting for those lines@ -449,0 +468,4 @@
name=variant_name,
arch=variant_info['arch'],
excluded_packages=variant_info.get('excluded_packages', []),
repos=[RepoInfo(
you can unpack dicts instead of passing keyword arguments
Yes, I know, but that variant is more readable