mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Swap pep8 current to legacy (#22891)
This commit is contained in:
parent
1ca4a42c0e
commit
ed52d91249
4 changed files with 1179 additions and 33 deletions
|
@ -37,8 +37,8 @@ except ImportError:
|
|||
|
||||
# modules that are ok that they do not have documentation strings
|
||||
BLACKLIST = {
|
||||
'MODULE': frozenset(( 'async_wrapper',)),
|
||||
'CACHE': frozenset(( 'base',)),
|
||||
'MODULE': frozenset(('async_wrapper',)),
|
||||
'CACHE': frozenset(('base',)),
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ def add_fragments(doc, filename):
|
|||
fragments = doc.get('extends_documentation_fragment', [])
|
||||
|
||||
if isinstance(fragments, string_types):
|
||||
fragments = [ fragments ]
|
||||
fragments = [fragments]
|
||||
|
||||
# Allow the module to specify a var other than DOCUMENTATION
|
||||
# to pull the fragment from, using dot notation as a separator
|
||||
|
@ -127,7 +127,7 @@ def get_docstring(filename, verbose=False):
|
|||
except Exception as e:
|
||||
display.debug('failed docstring parsing: %s' % str(e))
|
||||
|
||||
if not 'docs' in data or not data['docs']:
|
||||
if 'docs' not in data or not data['docs']:
|
||||
display.debug('Fallback to vars parsing')
|
||||
for child in M.body:
|
||||
if isinstance(child, ast.Assign):
|
||||
|
|
|
@ -1,30 +1 @@
|
|||
E123
|
||||
E124
|
||||
E127
|
||||
E128
|
||||
E201
|
||||
E202
|
||||
E203
|
||||
E211
|
||||
E221
|
||||
E222
|
||||
E225
|
||||
E226
|
||||
E227
|
||||
E228
|
||||
E231
|
||||
E241
|
||||
E251
|
||||
E261
|
||||
E262
|
||||
E265
|
||||
E266
|
||||
E301
|
||||
E302
|
||||
E303
|
||||
E402
|
||||
E502
|
||||
E713
|
||||
E731
|
||||
W391
|
||||
W503
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,29 @@
|
|||
E123
|
||||
E124
|
||||
E127
|
||||
E128
|
||||
E201
|
||||
E202
|
||||
E203
|
||||
E211
|
||||
E221
|
||||
E222
|
||||
E225
|
||||
E226
|
||||
E227
|
||||
E228
|
||||
E231
|
||||
E241
|
||||
E251
|
||||
E261
|
||||
E262
|
||||
E265
|
||||
E266
|
||||
E301
|
||||
E302
|
||||
E303
|
||||
E502
|
||||
E713
|
||||
E731
|
||||
W391
|
||||
W503
|
Loading…
Reference in a new issue