Skip to content

Commit

Permalink
Remove ___future__ importing to each source file in atomic-reactor
Browse files Browse the repository at this point in the history
*CLOUDBLD-3286

Signed-off-by: Salatskyi Serhii <ssalatsk@redhat.com>
  • Loading branch information
Salatskyi Serhii authored and MartinBasti committed Nov 30, 2020
1 parent 61e63f8 commit 4133181
Show file tree
Hide file tree
Showing 174 changed files with 2 additions and 336 deletions.
2 changes: 2 additions & 0 deletions .pylintrc
Expand Up @@ -44,10 +44,12 @@ disable=I,
missing-docstring,
misplaced-comparison-constant,
multiple-statements, # nice to have
no-absolute-import, # it was required for py2
no-init,
no-self-argument, # nice to have
not-callable, # disabled due to flexmock module
not-context-manager, # causes false positives
old-division, # it was required for py2
protected-access,
redefined-outer-name, # nice to have
relative-import, # nice to have
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/__init__.py
Expand Up @@ -9,8 +9,6 @@
constants
"""

from __future__ import absolute_import

from locale import nl_langinfo, CODESET
import logging
from os import fdopen, dup
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/api.py
Expand Up @@ -8,8 +8,6 @@
Python API for atomic-reactor. This is the official way of interacting with atomic-reactor.
"""
from __future__ import absolute_import

from atomic_reactor.inner import DockerBuildWorkflow
from atomic_reactor.outer import PrivilegedBuildManager, DockerhostBuildManager
from atomic_reactor.plugins.pre_pull_base_image import PullBaseImagePlugin
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/auth.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import

from requests.auth import AuthBase, HTTPBasicAuth
from requests.cookies import extract_cookies_to_jar
from requests.utils import parse_dict_header
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/build.py
Expand Up @@ -9,8 +9,6 @@
Classes which implement tasks which builder has to be capable of doing.
Logic above these classes has to set the workflow itself.
"""
from __future__ import absolute_import

import re
from textwrap import dedent

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/buildimage.py
Expand Up @@ -12,8 +12,6 @@
* build image from local git repo
* build image using provided tarball (made with sdist)
"""
from __future__ import absolute_import

import os
import shutil
import subprocess
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/cli/main.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import json
import argparse
import logging
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/constants.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import os

DOCKER_SOCKET_PATH = '/var/run/docker.sock'
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/core.py
Expand Up @@ -22,8 +22,6 @@
"""
from __future__ import absolute_import

import os
import shutil
import logging
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/download.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

import logging
import os
import time
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/inner.py
Expand Up @@ -9,8 +9,6 @@
Script for building docker image. This is expected to run inside container.
"""

from __future__ import absolute_import, division

import json
import logging
import tempfile
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/metadata.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import, unicode_literals

import functools

from atomic_reactor.plugin import BuildPlugin
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/outer.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

from functools import partial
import json
import os
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugin.py
Expand Up @@ -10,8 +10,6 @@
plugins are supposed to be run when image is built and we need to extract some information
"""
from __future__ import absolute_import

import copy
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/build_buildah.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import

import subprocess
from six import PY2
import os
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/build_docker_api.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import

import docker
from atomic_reactor.plugin import BuildStepPlugin
from atomic_reactor.util import wait_for_command, allow_repo_dir_in_dockerignore
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/build_imagebuilder.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import

import subprocess
from six import PY2
import os
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/build_orchestrate_build.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, division, absolute_import

from collections import namedtuple
from copy import deepcopy
from multiprocessing.pool import ThreadPool
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/build_source_container.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import

import os
import subprocess
import tempfile
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_import_image.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import unicode_literals, absolute_import

from osbs.exceptions import OsbsResponseException
from osbs.utils import retry_on_conflict, ImageName

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_koji_import.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import unicode_literals, absolute_import

import copy
import json
import koji
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_koji_tag_build.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import unicode_literals, absolute_import

from atomic_reactor.constants import PLUGIN_KOJI_TAG_BUILD_KEY
from atomic_reactor.utils.koji import tag_koji_build
from atomic_reactor.util import is_scratch_build
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_push_floating_tags.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import unicode_literals, absolute_import

from atomic_reactor.constants import PLUGIN_PUSH_FLOATING_TAGS_KEY, PLUGIN_GROUP_MANIFESTS_KEY
from atomic_reactor.utils.manifest import ManifestUtil
from atomic_reactor.plugin import ExitPlugin
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_remove_built_image.py
Expand Up @@ -8,8 +8,6 @@
Remove built image (this only makes sense if you store the image in some registry first)
"""
from __future__ import absolute_import

from atomic_reactor.plugin import ExitPlugin

from docker.errors import APIError
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_remove_worker_metadata.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

from atomic_reactor.plugin import ExitPlugin
from atomic_reactor.constants import PLUGIN_REMOVE_WORKER_METADATA_KEY
from osbs.exceptions import OsbsResponseException
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_sendmail.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import re
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_store_logs_to_file.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import json
from atomic_reactor.constants import CONTAINER_RESULTS_JSON_PATH
from atomic_reactor.inner import BuildResultsEncoder
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_store_metadata_in_osv3.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import

import json
import os

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/exit_verify_media_types.py
Expand Up @@ -8,8 +8,6 @@
the registry expects
"""

from __future__ import unicode_literals, absolute_import

from atomic_reactor.constants import (PLUGIN_GROUP_MANIFESTS_KEY, PLUGIN_VERIFY_MEDIA_KEY,
PLUGIN_FETCH_SOURCES_KEY,
MEDIA_TYPE_DOCKER_V2_SCHEMA1,
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/input_env.py
Expand Up @@ -8,8 +8,6 @@
Reads input from environment variable
"""
from __future__ import absolute_import

import json
import os
from atomic_reactor.constants import BUILD_JSON_ENV
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/input_osv3.py
Expand Up @@ -8,8 +8,6 @@
Reads input from OpenShift v3
"""
from __future__ import absolute_import

import json
import os

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/input_path.py
Expand Up @@ -8,8 +8,6 @@
Reads input from provided path
"""
from __future__ import absolute_import

import json
import os

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_compare_components.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

import logging

from atomic_reactor.plugin import PostBuildPlugin
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_compress.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import, division

import gzip
try:
# if we import "lzma" first, we get pyliblzma on Py2, but we want backports.lzma
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_export_operator_manifests.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import os
import shutil
import tarfile
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_fetch_worker_metadata.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

from atomic_reactor.plugin import PostBuildPlugin
from atomic_reactor.plugins.build_orchestrate_build import get_worker_build_info
from atomic_reactor.constants import PLUGIN_FETCH_WORKER_METADATA_KEY
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_group_manifests.py
Expand Up @@ -11,8 +11,6 @@
"""


from __future__ import unicode_literals, absolute_import

from atomic_reactor.plugin import PostBuildPlugin
from atomic_reactor.plugins.pre_reactor_config import get_platform_descriptors, get_group_manifests
from atomic_reactor.util import (ManifestDigest, get_manifest_media_type,
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_koji_upload.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import unicode_literals, absolute_import, division

from collections import namedtuple
import os
from tempfile import NamedTemporaryFile
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_push_operator_manifest.py
Expand Up @@ -5,8 +5,6 @@
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import absolute_import

import os

from atomic_reactor.constants import (
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_rpmqa.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

from atomic_reactor.plugin import PostBuildPlugin
from atomic_reactor.utils.rpm import rpm_qf_args, parse_rpm_output

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_tag_and_push.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

from copy import deepcopy
import subprocess
import time
Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/post_tag_from_config.py
Expand Up @@ -6,8 +6,6 @@
of the BSD license. See the LICENSE file for details.
"""

from __future__ import absolute_import

import os
import re

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/pre_add_buildargs_in_df.py
Expand Up @@ -8,8 +8,6 @@
Adds all provided buildargs as ARG after each FROM in Dockerfile
"""

from __future__ import absolute_import

from atomic_reactor.plugin import PreBuildPlugin
from atomic_reactor.util import df_parser

Expand Down
2 changes: 0 additions & 2 deletions atomic_reactor/plugins/pre_add_dockerfile.py
Expand Up @@ -36,8 +36,6 @@
"""

from __future__ import absolute_import

import os
import shutil
from atomic_reactor.constants import DOCKERFILE_FILENAME, IMAGE_BUILD_INFO_DIR
Expand Down

0 comments on commit 4133181

Please sign in to comment.