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 = [] messages = []
errors = [SanityMessage( errors = [SanityMessage(
message=m['message'], message=m['message'].replace('\n', ' '),
path=m['path'], path=m['path'],
line=int(m['line']), line=int(m['line']),
column=int(m['column']), column=int(m['column']),

View file

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

View file

@ -374,6 +374,9 @@ class Display(object):
message = message.replace(self.clear, color) message = message.replace(self.clear, color)
message = '%s%s%s' % (color, message, self.clear) 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) print(message, file=fd)
fd.flush() fd.flush()

View file

@ -1,24 +1,100 @@
abstract-method
access-member-before-definition access-member-before-definition
anomalous-backslash-in-string
anomalous-unicode-escape-in-string
arguments-differ
assignment-from-no-return 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 function-redefined
global-at-module-level
global-statement
global-variable-not-assigned
global-variable-undefined
import-error import-error
import-self
invalid-name
line-too-long
locally-disabled locally-disabled
locally-enabled logging-format-interpolation
logging-not-lazy
lost-exception
method-hidden method-hidden
misplaced-comparison-constant
missing-docstring
no-member no-member
no-name-in-module
no-self-use
no-value-for-parameter no-value-for-parameter
non-iterator-returned non-iterator-returned
no-name-in-module
not-a-mapping not-a-mapping
not-an-iterable not-an-iterable
not-callable not-callable
R pointless-statement
pointless-string-statement
protected-access
raising-bad-type 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-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 unexpected-keyword-arg
ungrouped-imports
unidiomatic-typecheck
unnecessary-lambda
unnecessary-pass
unneeded-not
unreachable
unsubscriptable-object unsubscriptable-object
unsupported-membership-test unsupported-membership-test
unused-argument
unused-import
unused-variable
unused-wildcard-import
used-before-assignment 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