diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-02 01:54:42 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-02 01:54:42 +0200 |
commit | 22089a1493535c55e0255ff6b324cb757166e2dd (patch) | |
tree | 05119ac113a7f03904e0464f593d8fc11b31957a | |
parent | df5ac91fd7c365231c850353f83e5abe6f0969d3 (diff) | |
download | pylint-22089a1493535c55e0255ff6b324cb757166e2dd.tar.gz |
Fix a couple of doc warnings, use string continuation.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | doc/index.rst | 2 | ||||
-rw-r--r-- | pylint/checkers/classes.py | 86 | ||||
-rw-r--r-- | pylint/checkers/python3.py | 6 |
4 files changed, 53 insertions, 53 deletions
@@ -323,9 +323,9 @@ RELEASE DATE -- VERSION the 'a' format on Python 3. * Add multiple checks for PEP 3101 advanced string formatting: - 'bad-format-string', 'missing-format-argument-key', - 'unused-format-string-argument', 'format-combined-specification', - 'missing-format-attribute' and 'invalid-format-index'. + 'bad-format-string', 'missing-format-argument-key', + 'unused-format-string-argument', 'format-combined-specification', + 'missing-format-attribute' and 'invalid-format-index'. * Issue broad-except and bare-except even if the number of except handlers is different than 1. Fixes issue #113. @@ -485,7 +485,7 @@ RELEASE DATE -- VERSION Golemon * Add new warnings for checking proper class __slots__: - `invalid-slots-object` and `invalid-slots`. + `invalid-slots-object` and `invalid-slots`. * Search for rc file in `~/.config/pylintrc` if `~/.pylintrc` doesn't exists (#121) @@ -807,10 +807,10 @@ RELEASE DATE -- VERSION (patch by tmarek@google.com) * #7394: W0212 (access to protected member) not emited on assigments - (patch by lothiraldan@gmail.com) + (patch by lothiraldan@gmail.com) * #18772; no prototype consistency check for mangled methods (patch by - lothiraldan@gmail.com) + lothiraldan@gmail.com) * #92911: emit W0102 when sets are used as default arguments in functions (patch by tmarek@google.com) diff --git a/doc/index.rst b/doc/index.rst index 01f44c8..d67a28d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,7 +12,7 @@ https://bitbucket.org/logilab/pylint run output message-control - features + features1 options extend ide-integration diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index 8e51a47..87e3bcf 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -107,9 +107,9 @@ def _is_attribute_property(name, klass): MSGS = { 'F0202': ('Unable to check methods signature (%s / %s)', 'method-check-failed', - 'Used when Pylint has been unable to check methods signature \ - compatibility for an unexpected reason. Please report this kind \ - if you don\'t make sense of it.'), + 'Used when Pylint has been unable to check methods signature ' + 'compatibility for an unexpected reason. Please report this kind ' + 'if you don\'t make sense of it.'), 'E0202': ('An attribute defined in %s line %s hides this method', 'method-hidden', @@ -118,35 +118,35 @@ MSGS = { 'client code.'), 'E0203': ('Access to member %r before its definition line %s', 'access-member-before-definition', - 'Used when an instance member is accessed before it\'s actually\ - assigned.'), + 'Used when an instance member is accessed before it\'s actually ' + 'assigned.'), 'W0201': ('Attribute %r defined outside __init__', 'attribute-defined-outside-init', - 'Used when an instance attribute is defined outside the __init__\ - method.'), + 'Used when an instance attribute is defined outside the __init__ ' + 'method.'), 'W0212': ('Access to a protected member %s of a client class', # E0214 'protected-access', - 'Used when a protected member (i.e. class member with a name \ - beginning with an underscore) is access outside the class or a \ - descendant of the class where it\'s defined.'), + 'Used when a protected member (i.e. class member with a name ' + 'beginning with an underscore) is access outside the class or a ' + 'descendant of the class where it\'s defined.'), 'E0211': ('Method has no argument', 'no-method-argument', - 'Used when a method which should have the bound instance as \ - first argument has no argument defined.'), + 'Used when a method which should have the bound instance as ' + 'first argument has no argument defined.'), 'E0213': ('Method should have "self" as first argument', 'no-self-argument', - 'Used when a method has an attribute different the "self" as\ - first argument. This is considered as an error since this is\ - a so common convention that you shouldn\'t break it!'), - 'C0202': ('Class method %s should have %s as first argument', # E0212 + 'Used when a method has an attribute different the "self" as ' + 'first argument. This is considered as an error since this is ' + 'a so common convention that you shouldn\'t break it!'), + 'C0202': ('Class method %s should have %s as first argument', 'bad-classmethod-argument', 'Used when a class method has a first argument named differently ' 'than the value specified in valid-classmethod-first-arg option ' '(default to "cls"), recommended to easily differentiate them ' 'from regular instance methods.'), - 'C0203': ('Metaclass method %s should have %s as first argument', # E0214 + 'C0203': ('Metaclass method %s should have %s as first argument', 'bad-mcs-method-argument', 'Used when a metaclass method has a first agument named ' 'differently than the value specified in valid-classmethod-first' @@ -167,58 +167,58 @@ MSGS = { ), 'R0201': ('Method could be a function', 'no-self-use', - 'Used when a method doesn\'t use its bound instance, and so could\ - be written as a function.' + 'Used when a method doesn\'t use its bound instance, and so could ' + 'be written as a function.' ), 'E0221': ('Interface resolved to %s is not a class', 'interface-is-not-class', - 'Used when a class claims to implement an interface which is not \ - a class.'), + 'Used when a class claims to implement an interface which is not ' + 'a class.'), 'E0222': ('Missing method %r from %s interface', 'missing-interface-method', - 'Used when a method declared in an interface is missing from a \ - class implementing this interface'), + 'Used when a method declared in an interface is missing from a ' + 'class implementing this interface'), 'W0221': ('Arguments number differs from %s %r method', 'arguments-differ', - 'Used when a method has a different number of arguments than in \ - the implemented interface or in an overridden method.'), + 'Used when a method has a different number of arguments than in ' + 'the implemented interface or in an overridden method.'), 'W0222': ('Signature differs from %s %r method', 'signature-differs', - 'Used when a method signature is different than in the \ - implemented interface or in an overridden method.'), + 'Used when a method signature is different than in the ' + 'implemented interface or in an overridden method.'), 'W0223': ('Method %r is abstract in class %r but is not overridden', 'abstract-method', - 'Used when an abstract method (i.e. raise NotImplementedError) is \ - not overridden in concrete class.' + 'Used when an abstract method (i.e. raise NotImplementedError) is ' + 'not overridden in concrete class.' ), - 'F0220': ('failed to resolve interfaces implemented by %s (%s)', # W0224 + 'F0220': ('failed to resolve interfaces implemented by %s (%s)', 'unresolved-interface', - 'Used when a Pylint as failed to find interfaces implemented by \ - a class'), + 'Used when a Pylint as failed to find interfaces implemented by ' + ' a class'), 'W0231': ('__init__ method from base class %r is not called', 'super-init-not-called', - 'Used when an ancestor class method has an __init__ method \ - which is not called by a derived class.'), + 'Used when an ancestor class method has an __init__ method ' + 'which is not called by a derived class.'), 'W0232': ('Class has no __init__ method', 'no-init', - 'Used when a class has no __init__ method, neither its parent \ - classes.'), + 'Used when a class has no __init__ method, neither its parent ' + 'classes.'), 'W0233': ('__init__ method from a non direct base class %r is called', 'non-parent-init-called', - 'Used when an __init__ method is called on a class which is not \ - in the direct ancestors for the analysed class.'), + 'Used when an __init__ method is called on a class which is not ' + 'in the direct ancestors for the analysed class.'), 'W0234': ('__iter__ returns non-iterator', 'non-iterator-returned', - 'Used when an __iter__ method returns something which is not an \ - iterable (i.e. has no `%s` method)' % NEXT_METHOD), + 'Used when an __iter__ method returns something which is not an ' + 'iterable (i.e. has no `%s` method)' % NEXT_METHOD), 'E0235': ('__exit__ must accept 3 arguments: type, value, traceback', 'bad-context-manager', - 'Used when the __exit__ special method, belonging to a \ - context manager, does not accept 3 arguments \ - (type, value, traceback).'), + 'Used when the __exit__ special method, belonging to a ' + 'context manager, does not accept 3 arguments ' + '(type, value, traceback).'), 'E0236': ('Invalid object %r in __slots__, must contain ' 'only non empty strings', 'invalid-slots-object', diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index cf5e888..837cbef 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -218,13 +218,13 @@ class Python3Checker(checkers.BaseChecker): 'W1618': ('import missing `from __future__ import absolute_import`', 'no-absolute-import', 'Used when an import is not accompanied by ' - '`from __future__ import absolute_import`' - ' (default behaviour in Python 3)', + '``from __future__ import absolute_import`` ' + '(default behaviour in Python 3)', {'maxversion': (3, 0)}), 'W1619': ('division w/o __future__ statement', 'old-division', 'Used for non-floor division w/o a float literal or ' - '``from __future__ import division``' + '``from __future__ import division`` ' '(Python 3 returns a float for int division unconditionally)', {'maxversion': (3, 0)}), 'W1620': ('Calling a dict.iter*() method', |