Commit f1c179dd authored by Adrian DC's avatar Adrian DC
Browse files

chore(settings): minor Python codestyle improvements

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 7dfaea1e
Loading
Loading
Loading
Loading
Loading
+20 −4
Changes for gitlab_projects_settings/features/settings.py: 20 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -53,14 +53,22 @@ class SettingsFeature:

        # Handle single project
        if project:
            SettingsFeature.project(options, gitlab, project.id)
            SettingsFeature.project(
                options,
                gitlab,
                project.id,
            )

        # Handle group recursively
        elif group:

            # Handle group
            if not options.exclude_group:
                SettingsFeature.group(options, gitlab, group.id)
                SettingsFeature.group(
                    options,
                    gitlab,
                    group.id,
                )

            # Iterate through subgroups
            if not options.exclude_subgroups:
@@ -70,7 +78,11 @@ class SettingsFeature:
                        order_by='path',
                        sort='asc',
                ):
                    SettingsFeature.group(options, gitlab, group_subgroup.id)
                    SettingsFeature.group(
                        options,
                        gitlab,
                        group_subgroup.id,
                    )

            # Iterate through projects
            if not options.exclude_projects:
@@ -80,7 +92,11 @@ class SettingsFeature:
                        order_by='path',
                        sort='asc',
                ):
                    SettingsFeature.project(options, gitlab, group_project.id)
                    SettingsFeature.project(
                        options,
                        gitlab,
                        group_project.id,
                    )

        # Result
        return True