From ece0be30ab94b3b25f70f3f71f41284a1b990e24 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 25 Sep 2020 16:15:10 +0200 Subject: [PATCH] Move ansible.galaxy.collection module into package This change preserves how all the external imports refer to this code while allowing us to start cutting the spaghetti into more easily maintainable pieces. This is a start of the upcoming refactoring effort destined to eliminate tight coupling, implicit data manipulation, god objects, abstraction leaks and other code smells. Essentially, `ansible.galaxy.collection` is going to be a package that holds parts of the collection management code spread across loosely coupled modules. PR: #71931 --- lib/ansible/galaxy/{collection.py => collection/__init__.py} | 2 ++ test/sanity/ignore.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename lib/ansible/galaxy/{collection.py => collection/__init__.py} (99%) diff --git a/lib/ansible/galaxy/collection.py b/lib/ansible/galaxy/collection/__init__.py similarity index 99% rename from lib/ansible/galaxy/collection.py rename to lib/ansible/galaxy/collection/__init__.py index eae0f389062..058977f8f97 100644 --- a/lib/ansible/galaxy/collection.py +++ b/lib/ansible/galaxy/collection/__init__.py @@ -1,5 +1,7 @@ +# -*- coding: utf-8 -*- # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +"""Installed collections management package.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 59a3bb7172a..0ca4188f9b2 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -37,7 +37,7 @@ lib/ansible/executor/powershell/async_watchdog.ps1 pslint:PSCustomUseLiteralPath lib/ansible/executor/powershell/async_wrapper.ps1 pslint:PSCustomUseLiteralPath lib/ansible/executor/powershell/exec_wrapper.ps1 pslint:PSCustomUseLiteralPath lib/ansible/executor/task_queue_manager.py pylint:blacklisted-name -lib/ansible/galaxy/collection.py compile-2.6!skip # 'ansible-galaxy collection' requires 2.7+ +lib/ansible/galaxy/collection/__init__.py compile-2.6!skip # 'ansible-galaxy collection' requires 2.7+ lib/ansible/module_utils/compat/_selectors2.py future-import-boilerplate # ignore bundled lib/ansible/module_utils/compat/_selectors2.py metaclass-boilerplate # ignore bundled lib/ansible/module_utils/compat/_selectors2.py pylint:blacklisted-name