Fix F401 and remove exclusion
Change-Id: Id2dbff06925ed8326e4a214aabc19d4ada5db69c
This commit is contained in:
@@ -125,9 +125,10 @@ openstack_networks:
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (
|
||||||
openstack_module_kwargs,
|
openstack_full_argument_spec,
|
||||||
openstack_cloud_from_module)
|
openstack_cloud_from_module,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -236,9 +236,10 @@ except ImportError:
|
|||||||
HAS_KEYSTONEAUTH1 = False
|
HAS_KEYSTONEAUTH1 = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||||
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (
|
||||||
openstack_module_kwargs,
|
openstack_full_argument_spec,
|
||||||
openstack_cloud_from_module)
|
openstack_cloud_from_module,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _get_volume_quotas(cloud, project):
|
def _get_volume_quotas(cloud, project):
|
||||||
|
|||||||
@@ -135,8 +135,6 @@ user:
|
|||||||
type: str
|
type: str
|
||||||
sample: "demouser"
|
sample: "demouser"
|
||||||
'''
|
'''
|
||||||
from distutils.version import StrictVersion
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
||||||
openstack_module_kwargs,
|
openstack_module_kwargs,
|
||||||
|
|||||||
@@ -118,9 +118,10 @@ openstack_users:
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (
|
||||||
openstack_module_kwargs,
|
openstack_full_argument_spec,
|
||||||
openstack_cloud_from_module)
|
openstack_cloud_from_module,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -99,9 +99,6 @@ volume:
|
|||||||
type: dict
|
type: dict
|
||||||
sample: {'...'}
|
sample: {'...'}
|
||||||
'''
|
'''
|
||||||
from distutils.version import StrictVersion
|
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (openstack_full_argument_spec,
|
||||||
openstack_module_kwargs,
|
openstack_module_kwargs,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ __metaclass__ = type
|
|||||||
# One unittest needs to import builtins via __import__() so we need to have
|
# One unittest needs to import builtins via __import__() so we need to have
|
||||||
# the string that represents it
|
# the string that represents it
|
||||||
try:
|
try:
|
||||||
import __builtin__
|
import __builtin__ # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
BUILTINS = 'builtins'
|
BUILTINS = 'builtins'
|
||||||
else:
|
else:
|
||||||
|
|||||||
4
tox.ini
4
tox.ini
@@ -49,9 +49,9 @@ commands = {posargs}
|
|||||||
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
|
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
|
||||||
# breaks should occur before the binary operator for readability.
|
# breaks should occur before the binary operator for readability.
|
||||||
# H4 are rules for docstrings. Maybe we should clean them?
|
# H4 are rules for docstrings. Maybe we should clean them?
|
||||||
# E501,E402,H301,H236,F401 are ignored so we can import the existing
|
# E501,E402,H301,H236 are ignored so we can import the existing
|
||||||
# modules unchanged and then clean them in subsequent patches.
|
# modules unchanged and then clean them in subsequent patches.
|
||||||
ignore = W503,H4,E501,E402,H301,H236,F401
|
ignore = W503,H4,E501,E402,H301,H236
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user