fix formatting issues

This commit is contained in:
Robert Kaussow 2019-04-09 10:58:15 +02:00
parent c2397b498a
commit 392aa9308d
3 changed files with 36 additions and 36 deletions

View File

@ -2,7 +2,6 @@
"""Main program."""
import argparse
import json
import multiprocessing
from ansiblelater import LOG, __version__, logger

View File

@ -1,15 +1,14 @@
"""Base methods."""
import importlib
import os
import sys
import importlib
from distutils.version import LooseVersion
import ansible
from distutils.version import LooseVersion
from ansiblelater import settings, utils
from ansiblelater import settings
from ansiblelater import utils
def get_settings(args):
"""
@ -29,21 +28,23 @@ def get_settings(args):
def get_standards(filepath):
sys.path.append(os.path.abspath(os.path.expanduser(filepath)))
try:
standards = importlib.import_module('standards')
standards = importlib.import_module("standards")
except ImportError as e:
utils.sysexit_with_message("Could not import standards from directory %s: %s" % (filepath, str(e)))
utils.sysexit_with_message(
"Could not import standards from directory %s: %s" % (filepath, str(e)))
if getattr(standards, "ansible_min_version", None) and \
LooseVersion(standards.ansible_min_version) > LooseVersion(ansible.__version__):
utils.sysexit_with_message("Standards require ansible version %s (current version %s). "
"Please upgrade ansible." %
(standards.ansible_min_version, ansible.__version__))
"Please upgrade ansible." %
(standards.ansible_min_version, ansible.__version__))
if getattr(standards, "ansible_review_min_version", None) and \
LooseVersion(standards.ansible_review_min_version) > LooseVersion(
utils.get_property("__version__")):
utils.sysexit_with_message("Standards require ansible-later version %s (current version %s). "
"Please upgrade ansible-later." %
(standards.ansible_review_min_version, utils.get_property("__version__")))
utils.sysexit_with_message(
"Standards require ansible-later version %s (current version %s). "
"Please upgrade ansible-later." %
(standards.ansible_review_min_version, utils.get_property("__version__")))
return standards.standards

View File

@ -1,11 +1,11 @@
#!/usr/bin/env python
"""Setup script for the package."""
import re
import os
import io
from setuptools import find_packages
from setuptools import setup
import os
import re
from setuptools import find_packages, setup
PACKAGE_NAME = "ansiblelater"
@ -14,7 +14,7 @@ def get_property(prop, project):
current_dir = os.path.dirname(os.path.realpath(__file__))
result = re.search(
r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
open(os.path.join(current_dir, project, '__init__.py')).read())
open(os.path.join(current_dir, project, "__init__.py")).read())
return result.group(1)
@ -35,25 +35,25 @@ setup(
url="https://github.com/xoxys/ansible-later",
license=get_property("__license__", PACKAGE_NAME),
long_description=get_readme(),
long_description_content_type='text/markdown',
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests", "tests.*"]),
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,,!=3.4.*',
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,,!=3.4.*",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'Natural Language :: English',
'Operating System :: POSIX',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities',
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Utilities",
],
include_package_data=True,
zip_safe=False,
@ -70,8 +70,8 @@ setup(
"anyconfig",
],
entry_points={
'console_scripts': [
'ansible-later = ansiblelater.__main__:main'
"console_scripts": [
"ansible-later = ansiblelater.__main__:main"
]
},
test_suite="tests"