From 6a80ba5e1acbaffc2367b777b9b7fe1205ea3a96 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Jun 2021 22:14:54 +0200 Subject: [PATCH] chore: replace flake8 config file and add autoformatting --- .flake8 | 5 ----- molecule/centos7/tests/test_default.py | 4 +++- molecule/centos8/tests/test_default.py | 4 +++- setup.cfg | 12 ++++++++++++ 4 files changed, 18 insertions(+), 7 deletions(-) delete mode 100644 .flake8 create mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 deleted file mode 100644 index b41e1fc..0000000 --- a/.flake8 +++ /dev/null @@ -1,5 +0,0 @@ -[flake8] -ignore = D101, D102, D103, D105, D107, E402, W503 -max-line-length = 99 -inline-quotes = double -exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env* diff --git a/molecule/centos7/tests/test_default.py b/molecule/centos7/tests/test_default.py index 68bb8a4..e9f7535 100644 --- a/molecule/centos7/tests/test_default.py +++ b/molecule/centos7/tests/test_default.py @@ -3,10 +3,12 @@ import os import testinfra.utils.ansible_runner import warnings + warnings.filterwarnings("ignore", category=DeprecationWarning) testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') + os.environ['MOLECULE_INVENTORY_FILE'] +).get_hosts('all') def test_cacerts_requirements(host): diff --git a/molecule/centos8/tests/test_default.py b/molecule/centos8/tests/test_default.py index 68bb8a4..e9f7535 100644 --- a/molecule/centos8/tests/test_default.py +++ b/molecule/centos8/tests/test_default.py @@ -3,10 +3,12 @@ import os import testinfra.utils.ansible_runner import warnings + warnings.filterwarnings("ignore", category=DeprecationWarning) testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') + os.environ['MOLECULE_INVENTORY_FILE'] +).get_hosts('all') def test_cacerts_requirements(host): diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2bb8674 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,12 @@ +[flake8] +ignore = D100, D101, D102, D103, D105, D107, E402, W503 +max-line-length = 99 +inline-quotes = double +exclude = .git,.tox,__pycache__,build,dist,tests,*.pyc,*.egg-info,.cache,.eggs,env* + +[yapf] +based_on_style = google +column_limit = 99 +dedent_closing_brackets = true +coalesce_brackets = true +split_before_logical_operator = true