From a51d64dfe3778a2f4f7c3b5330d97134def19b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Thu, 15 Jun 2017 13:40:06 +0200 Subject: [PATCH] constants: pep8 fix (#25735) --- lib/ansible/constants.py | 7 ++++--- test/sanity/pep8/legacy-files.txt | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index fb33b6f0327..1f0e08c0d1b 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -30,12 +30,13 @@ config = ConfigManager() for setting in config.data.get_settings(): vars()[setting.name] = setting.value + def mk_boolean(value): ''' moved ''' return config.make_boolean(value) -### CONSTANTS ### yes, actual ones +# ### CONSTANTS ### yes, actual ones BLACKLIST_EXTS = ('.pyc', '.pyo', '.swp', '.bak', '~', '.rpm', '.md', '.txt') BECOME_METHODS = ['sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun'] @@ -66,7 +67,7 @@ DEFAULT_SUDO_PASS = None DEFAULT_REMOTE_PASS = None DEFAULT_SUBSET = None DEFAULT_SU_PASS = None -IGNORE_FILES = ["COPYING", "CONTRIBUTING", "LICENSE", "README", "VERSION", "GUIDELINES"] # ignore during module search +IGNORE_FILES = ["COPYING", "CONTRIBUTING", "LICENSE", "README", "VERSION", "GUIDELINES"] # ignore during module search INTERNAL_RESULT_KEYS = ['add_host', 'add_group'] LOCALHOST = frozenset(['127.0.0.1', 'localhost', '::1']) MODULE_REQUIRE_ARGS = ['command', 'win_command', 'shell', 'win_shell', 'raw', 'script'] @@ -75,4 +76,4 @@ RESTRICTED_RESULT_KEYS = ['ansible_rsync_path', 'ansible_playbook_python'] TREE_DIR = None VAULT_VERSION_MIN = 1.0 VAULT_VERSION_MAX = 1.0 -YAML_FILENAME_EXTENSIONS = [".yml", ".yaml", ".json"] # check all of these extensions when looking for 'variable' files which should be YAML or JSON. +YAML_FILENAME_EXTENSIONS = [".yml", ".yaml", ".json"] # check all of these extensions when looking for 'variable' files which should be YAML or JSON. diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index 86d5fbd5436..408bea01180 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -1,5 +1,4 @@ hacking/conf2yaml.py -lib/ansible/constants.py lib/ansible/cli/config.py lib/ansible/config/data.py lib/ansible/config/manager.py