From 36e6c7973da5854605c040e3728acd7e1f8af550 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Fri, 24 Feb 2017 02:01:03 -0600 Subject: [PATCH] pep8 fixes for module_docs_fragments (#21876) --- lib/ansible/utils/module_docs_fragments/aws.py | 4 +++- lib/ansible/utils/module_docs_fragments/azure_tags.py | 7 +++++-- lib/ansible/utils/module_docs_fragments/ec2.py | 3 ++- lib/ansible/utils/module_docs_fragments/files.py | 4 +++- lib/ansible/utils/module_docs_fragments/fortios.py | 1 + lib/ansible/utils/module_docs_fragments/netapp.py | 3 ++- lib/ansible/utils/module_docs_fragments/ovirt.py | 4 +++- lib/ansible/utils/module_docs_fragments/ovirt_facts.py | 4 +++- lib/ansible/utils/module_docs_fragments/return_common.py | 2 +- lib/ansible/utils/module_docs_fragments/vca.py | 1 - test/sanity/pep8/legacy-files.txt | 7 ------- 11 files changed, 23 insertions(+), 17 deletions(-) diff --git a/lib/ansible/utils/module_docs_fragments/aws.py b/lib/ansible/utils/module_docs_fragments/aws.py index dcc3597776..d15c400b6c 100644 --- a/lib/ansible/utils/module_docs_fragments/aws.py +++ b/lib/ansible/utils/module_docs_fragments/aws.py @@ -23,7 +23,9 @@ class ModuleDocFragment(object): options: ec2_url: description: - - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used. + - Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). + Ignored for modules where region is required. Must be specified for all other modules if region is not used. + If not set then the value of the EC2_URL environment variable, if any, is used. required: false default: null aliases: [] diff --git a/lib/ansible/utils/module_docs_fragments/azure_tags.py b/lib/ansible/utils/module_docs_fragments/azure_tags.py index 3a9c6cbfed..b36c319ec6 100644 --- a/lib/ansible/utils/module_docs_fragments/azure_tags.py +++ b/lib/ansible/utils/module_docs_fragments/azure_tags.py @@ -25,12 +25,15 @@ class ModuleDocFragment(object): options: tags: description: - - "Dictionary of string:string pairs to assign as metadata to the object. Metadata tags on the object will be updated with any provided values. To remove tags set append_tags option to false." + - > + Dictionary of string:string pairs to assign as metadata to the object. + Metadata tags on the object will be updated with any provided values. To remove tags set append_tags option to false. required: false default: null append_tags: description: - - Use to control if tags field is canonical or just appends to existing tags. When canonical, any tags not found in the tags parameter will be removed from the object's metadata. + - Use to control if tags field is canonical or just appends to existing tags. + When canonical, any tags not found in the tags parameter will be removed from the object's metadata. default: True required: false ''' diff --git a/lib/ansible/utils/module_docs_fragments/ec2.py b/lib/ansible/utils/module_docs_fragments/ec2.py index 9255740726..5485f484af 100644 --- a/lib/ansible/utils/module_docs_fragments/ec2.py +++ b/lib/ansible/utils/module_docs_fragments/ec2.py @@ -23,7 +23,8 @@ class ModuleDocFragment(object): options: region: description: - - The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region) + - The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. + See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region) required: false aliases: [ 'aws_region', 'ec2_region' ] """ diff --git a/lib/ansible/utils/module_docs_fragments/files.py b/lib/ansible/utils/module_docs_fragments/files.py index fc1ca70892..0c321a1cf0 100644 --- a/lib/ansible/utils/module_docs_fragments/files.py +++ b/lib/ansible/utils/module_docs_fragments/files.py @@ -25,7 +25,9 @@ options: required: false default: null description: - - Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers (like 0644). Leaving off the leading zero will likely have unexpected results. As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)). + - Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers (like 0644). + Leaving off the leading zero will likely have unexpected results. + As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)). owner: required: false default: null diff --git a/lib/ansible/utils/module_docs_fragments/fortios.py b/lib/ansible/utils/module_docs_fragments/fortios.py index 677089e3a3..53d7aac946 100644 --- a/lib/ansible/utils/module_docs_fragments/fortios.py +++ b/lib/ansible/utils/module_docs_fragments/fortios.py @@ -17,6 +17,7 @@ # along with Ansible. If not, see . # + class ModuleDocFragment(object): # Standard files documentation fragment diff --git a/lib/ansible/utils/module_docs_fragments/netapp.py b/lib/ansible/utils/module_docs_fragments/netapp.py index 1f62ce5ec8..894946dd94 100644 --- a/lib/ansible/utils/module_docs_fragments/netapp.py +++ b/lib/ansible/utils/module_docs_fragments/netapp.py @@ -38,7 +38,8 @@ options: username: required: true description: - - This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required. For more information, please read the documentation U(https://goo.gl/BRu78Z). + - This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required. + For more information, please read the documentation U(https://goo.gl/BRu78Z). password: required: true description: diff --git a/lib/ansible/utils/module_docs_fragments/ovirt.py b/lib/ansible/utils/module_docs_fragments/ovirt.py index 932ddb4ad1..8eefbedf63 100644 --- a/lib/ansible/utils/module_docs_fragments/ovirt.py +++ b/lib/ansible/utils/module_docs_fragments/ovirt.py @@ -18,6 +18,7 @@ # along with Ansible. If not, see . # + class ModuleDocFragment(object): # Standard oVirt documentation fragment @@ -41,7 +42,8 @@ options: required: True description: - "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:" - - "C(username)[I(required)] - The name of the user, something like `I(admin@internal)`. Default value is set by I(OVIRT_USERNAME) environment variable." + - C(username)[I(required)] - The name of the user, something like I(admin@internal). + Default value is set by I(OVIRT_USERNAME) environment variable. - "C(password)[I(required)] - The password of the user. Default value is set by I(OVIRT_PASSWORD) environment variable." - "C(url)[I(required)] - A string containing the base URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`. Default value is set by I(OVIRT_URL) environment variable." diff --git a/lib/ansible/utils/module_docs_fragments/ovirt_facts.py b/lib/ansible/utils/module_docs_fragments/ovirt_facts.py index 6fc690589d..36a3da0745 100644 --- a/lib/ansible/utils/module_docs_fragments/ovirt_facts.py +++ b/lib/ansible/utils/module_docs_fragments/ovirt_facts.py @@ -18,6 +18,7 @@ # along with Ansible. If not, see . # + class ModuleDocFragment(object): # facts standard oVirt documentation fragment @@ -38,7 +39,8 @@ options: required: True description: - "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:" - - "C(username)[I(required)] - The name of the user, something like `I(admin@internal)`. Default value is set by I(OVIRT_USERNAME) environment variable." + - C(username)[I(required)] - The name of the user, something like I(admin@internal). + Default value is set by I(OVIRT_USERNAME) environment variable. - "C(password)[I(required)] - The password of the user. Default value is set by I(OVIRT_PASSWORD) environment variable." - "C(url)[I(required)] - A string containing the base URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`. Default value is set by I(OVIRT_URL) environment variable." diff --git a/lib/ansible/utils/module_docs_fragments/return_common.py b/lib/ansible/utils/module_docs_fragments/return_common.py index 1407f9135a..f6fc1afc55 100644 --- a/lib/ansible/utils/module_docs_fragments/return_common.py +++ b/lib/ansible/utils/module_docs_fragments/return_common.py @@ -19,7 +19,7 @@ class ModuleDocFragment(object): # Standard documentation fragment - RETURN= ''' + RETURN = ''' changed: description: Whether the module affected changes on the target. returned: always diff --git a/lib/ansible/utils/module_docs_fragments/vca.py b/lib/ansible/utils/module_docs_fragments/vca.py index 019c9715ee..1fad1de18f 100644 --- a/lib/ansible/utils/module_docs_fragments/vca.py +++ b/lib/ansible/utils/module_docs_fragments/vca.py @@ -80,4 +80,3 @@ options: required: false default: gateway """ - diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index 4eb2a21df2..6065e7596c 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -261,11 +261,4 @@ lib/ansible/plugins/strategy/linear.py lib/ansible/template/__init__.py lib/ansible/utils/encrypt.py lib/ansible/utils/module_docs.py -lib/ansible/utils/module_docs_fragments/aws.py -lib/ansible/utils/module_docs_fragments/azure_tags.py -lib/ansible/utils/module_docs_fragments/ec2.py -lib/ansible/utils/module_docs_fragments/files.py -lib/ansible/utils/module_docs_fragments/netapp.py -lib/ansible/utils/module_docs_fragments/ovirt.py -lib/ansible/utils/module_docs_fragments/ovirt_facts.py lib/ansible/vars/__init__.py