Skip to content

Commit

Permalink
Lint fixes.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Sep 15, 2023
1 parent aa40386 commit a9e43d2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
4 changes: 0 additions & 4 deletions galaxy_ng/app/api/v1/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@
from galaxy_importer.legacy_role import import_legacy_role

from galaxy_ng.app.models.auth import User
from galaxy_ng.app.models.namespace import Namespace
from galaxy_ng.app.utils.namespaces import generate_v3_namespace_from_attributes
from galaxy_ng.app.utils.galaxy import upstream_role_iterator
from galaxy_ng.app.utils.git import get_tag_commit_hash
from galaxy_ng.app.utils.git import get_tag_commit_date
from galaxy_ng.app.utils.rbac import add_user_to_v3_namespace
from galaxy_ng.app.utils.rbac import get_v3_namespace_owners
from galaxy_ng.app.utils.legacy import process_namespace

from galaxy_ng.app.api.v1.models import LegacyNamespace
Expand Down
6 changes: 2 additions & 4 deletions galaxy_ng/app/management/commands/import-galaxy-role.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import django_guid
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand

from galaxy_ng.app.api.v1.tasks import legacy_role_import
Expand All @@ -17,8 +16,8 @@ class Command(BaseCommand):
help = 'Sync upstream namespaces from [old-]galaxy.ansible.com'

def add_arguments(self, parser):
parser.add_argument("--github_user", required=True, help="find and sync only this namespace name")
parser.add_argument("--github_repo", required=True, help="find and sync only this namespace name")
parser.add_argument("--github_user", required=True)
parser.add_argument("--github_repo", required=True)
parser.add_argument("--role_name", help="find and sync only this namespace name")
parser.add_argument("--branch", help="find and sync only this namespace name")
parser.add_argument("--request_username", help="find and sync only this namespace name")
Expand All @@ -35,4 +34,3 @@ def handle(self, *args, **options):
github_reference=options['branch'],
alternate_role_name=options['role_name'],
)

2 changes: 0 additions & 2 deletions galaxy_ng/app/management/commands/sync-galaxy-roles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import django_guid
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand

from galaxy_ng.app.api.v1.tasks import legacy_sync_from_upstream


Expand Down
6 changes: 4 additions & 2 deletions galaxy_ng/app/utils/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ def upstream_collection_iterator(
break
next_owners_url = _baseurl + o_data['next_link']
'''
namespace_cache[ns_id]['summary_fields']['owners'] = get_namespace_owners_details(_baseurl, ns_id)
namespace_cache[ns_id]['summary_fields']['owners'] = \
get_namespace_owners_details(_baseurl, ns_id)

else:
namespace_data = namespace_cache[ns_id]
Expand Down Expand Up @@ -399,7 +400,8 @@ def upstream_role_iterator(
break
next_owners_url = _baseurl + o_data['next_link']
'''
namespace_cache[ns_id]['summary_fields']['owners'] = get_namespace_owners_details(_baseurl, ns_id)
namespace_cache[ns_id]['summary_fields']['owners'] = \
get_namespace_owners_details(_baseurl, ns_id)

else:
namespace_data = namespace_cache[ns_id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def extract_default_config(ansible_config):
return cfg



@pytest.mark.deployment_community
def test_admin_can_import_legacy_roles(ansible_config):

Expand Down

0 comments on commit a9e43d2

Please sign in to comment.