1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Expand disabled pylint rules. (#29162)

* Expand disabled pylint rules.
* Fix pylint and unicode issues in ansible-test.
This commit is contained in:
Matt Clay 2017-09-09 08:59:09 -07:00 committed by GitHub
parent 4c229e566e
commit f88750d665
5 changed files with 87 additions and 9 deletions

View file

@ -89,7 +89,7 @@ class PylintTest(SanitySingleVersion):
messages = []
errors = [SanityMessage(
message=m['message'],
message=m['message'].replace('\n', ' '),
path=m['path'],
line=int(m['line']),
column=int(m['column']),

View file

@ -359,7 +359,7 @@ class TestFailure(TestResult):
if self.summary:
block = self.summary
else:
block = '\n'.join(str(m) for m in self.messages)
block = '\n'.join(m.format() for m in self.messages)
message = block.strip()

View file

@ -374,6 +374,9 @@ class Display(object):
message = message.replace(self.clear, color)
message = '%s%s%s' % (color, message, self.clear)
if sys.version_info[0] == 2 and isinstance(message, type(u'')):
message = message.encode('utf-8')
print(message, file=fd)
fd.flush()

View file

@ -1,24 +1,100 @@
abstract-method
access-member-before-definition
anomalous-backslash-in-string
anomalous-unicode-escape-in-string
arguments-differ
assignment-from-no-return
C
attribute-defined-outside-init
bad-continuation
bad-format-string
bad-indentation
bad-mcs-classmethod-argument
bad-open-mode
bad-whitespace
bare-except
blacklisted-name
broad-except
cell-var-from-loop
consider-iterating-dictionary
consider-using-enumerate
dangerous-default-value
deprecated-method
deprecated-module
duplicate-key
eval-used
exec-used
expression-not-assigned
fixme
function-redefined
global-at-module-level
global-statement
global-variable-not-assigned
global-variable-undefined
import-error
import-self
invalid-name
line-too-long
locally-disabled
locally-enabled
logging-format-interpolation
logging-not-lazy
lost-exception
method-hidden
misplaced-comparison-constant
missing-docstring
no-member
no-name-in-module
no-self-use
no-value-for-parameter
non-iterator-returned
no-name-in-module
not-a-mapping
not-an-iterable
not-callable
R
pointless-statement
pointless-string-statement
protected-access
raising-bad-type
raising-non-exception
redefined-builtin
redefined-outer-name
redefined-variable-type
redundant-unittest-assert
reimported
signature-differs
simplifiable-if-statement
super-init-not-called
superfluous-parens
suppressed-message
too-few-public-methods
too-many-ancestors
too-many-arguments
too-many-boolean-expressions
too-many-branches
too-many-function-args
too-many-instance-attributes
too-many-lines
too-many-locals
too-many-nested-blocks
too-many-public-methods
too-many-return-statements
too-many-statements
trailing-newlines
undefined-loop-variable
unexpected-keyword-arg
ungrouped-imports
unidiomatic-typecheck
unnecessary-lambda
unnecessary-pass
unneeded-not
unreachable
unsubscriptable-object
unsupported-membership-test
unused-argument
unused-import
unused-variable
unused-wildcard-import
used-before-assignment
W
useless-else-on-loop
useless-suppression
using-constant-test
wildcard-import
wrong-import-order
wrong-import-position

View file

@ -1 +0,0 @@
#wildcard-import