From c93328aba2f43d861e38d361eabe2199273e5370 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Jun 2021 22:31:49 +0200 Subject: [PATCH] chore: replace flake8 config file and add autoformatting --- setup.cfg | 1 + .../.flake8 | 5 ----- .../tests/test_default.py | 6 ++---- .../setup.cfg | 12 ++++++++++++ 4 files changed, 15 insertions(+), 9 deletions(-) create mode 120000 setup.cfg delete mode 100644 {{cookiecutter.author}}.{{cookiecutter.role_name}}/.flake8 create mode 100644 {{cookiecutter.author}}.{{cookiecutter.role_name}}/setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 120000 index 0000000..79f8453 --- /dev/null +++ b/setup.cfg @@ -0,0 +1 @@ +{{cookiecutter.author}}.{{cookiecutter.role_name}}/setup.cfg \ No newline at end of file diff --git a/{{cookiecutter.author}}.{{cookiecutter.role_name}}/.flake8 b/{{cookiecutter.author}}.{{cookiecutter.role_name}}/.flake8 deleted file mode 100644 index b41e1fc..0000000 --- a/{{cookiecutter.author}}.{{cookiecutter.role_name}}/.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/{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py b/{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py index 20e114b..18236da 100644 --- a/{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py +++ b/{{cookiecutter.author}}.{{cookiecutter.role_name}}/molecule/{{cookiecutter.molecule_scenario|replace('-', '')}}/tests/test_default.py @@ -1,9 +1,7 @@ import os -import warnings import testinfra.utils.ansible_runner -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") diff --git a/{{cookiecutter.author}}.{{cookiecutter.role_name}}/setup.cfg b/{{cookiecutter.author}}.{{cookiecutter.role_name}}/setup.cfg new file mode 100644 index 0000000..2bb8674 --- /dev/null +++ b/{{cookiecutter.author}}.{{cookiecutter.role_name}}/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