-
-
Save max-k/440fcaecfe42557c8e93f93ec5943f3d to your computer and use it in GitHub Desktop.
pylint message ids
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C0102: Black listed name "%s" | |
C0103: Invalid %s name "%s" | |
C0111: Missing %s docstring | |
C0112: Empty %s docstring | |
C0121: Missing required attribute "%s" | |
C0202: Class method %s should have cls as first argument | |
C0203: Metaclass method %s should have mcs as first argument | |
C0204: Metaclass class method %s should have %s as first argument | |
C0301: Line too long (%s/%s) | |
C0302: Too many lines in module (%s) | |
C0303: Trailing whitespace | |
C0304: Final newline missing | |
C0321: More than one statement on a single line | |
C0322: Old: Operator not preceded by a space | |
C0323: Old: Operator not followed by a space | |
C0324: Old: Comma not followed by a space | |
C0325: Unnecessary parens after %r keyword | |
C0326: %s space %s %s %s\n%s | |
C1001: Old-style class defined. | |
E0001: (syntax error raised for a module; message varies) | |
E0011: Unrecognized file option %r | |
E0012: Bad option value %r | |
E0100: __init__ method is a generator | |
E0101: Explicit return in __init__ | |
E0102: %s already defined line %s | |
E0103: %r not properly in loop | |
E0104: Return outside function | |
E0105: Yield outside function | |
E0106: Return with argument inside generator | |
E0107: Use of the non-existent %s operator | |
E0108: Duplicate argument name %s in function definition | |
E0202: An attribute affected in %s line %s hide this method | |
E0203: Access to member %r before its definition line %s | |
E0211: Method has no argument | |
E0213: Method should have "self" as first argument | |
E0221: Interface resolved to %s is not a class | |
E0222: Missing method %r from %s interface | |
E0235: __exit__ must accept 3 arguments: type, value, traceback | |
E0501: Old: Non ascii characters found but no encoding specified (PEP 263) | |
E0502: Old: Wrong encoding specified (%s) | |
E0503: Old: Unknown encoding specified (%s) | |
E0601: Using variable %r before assignment | |
E0602: Undefined variable %r | |
E0603: Undefined variable name %r in __all__ | |
E0604: Invalid object %r in __all__, must contain only strings | |
E0611: No name %r in module %r | |
E0701: Bad except clauses order (%s) | |
E0702: Raising %s while only classes, instances or string are allowed | |
E0710: Raising a new style class which doesn't inherit from BaseException | |
E0711: NotImplemented raised - should raise NotImplementedError | |
E0712: Catching an exception which doesn\'t inherit from BaseException: %s | |
E1001: Use of __slots__ on an old style class | |
E1002: Use of super on an old style class | |
E1003: Bad first argument %r given to super() | |
E1004: Missing argument to super() | |
E1101: %s %r has no %r member | |
E1102: %s is not callable | |
E1103: %s %r has no %r member (but some types could not be inferred) | |
E1111: Assigning to function call which doesn't return | |
E1120: No value passed for parameter %s in function call | |
E1121: Too many positional arguments for function call | |
E1122: Old: Duplicate keyword argument %r in function call | |
E1123: Passing unexpected keyword argument %r in function call | |
E1124: Parameter %r passed as both positional and keyword argument | |
E1125: Old: Missing mandatory keyword argument %r | |
E1200: Unsupported logging format character %r (%#02x) at index %d | |
E1201: Logging format string ends in middle of conversion specifier | |
E1205: Too many arguments for logging format string | |
E1206: Not enough arguments for logging format string | |
E1300: Unsupported format character %r (%#02x) at index %d | |
E1301: Format string ends in middle of conversion specifier | |
E1302: Mixing named and unnamed conversion specifiers in format string | |
E1303: Expected mapping for format string, not %s | |
E1304: Missing key %r in format string dictionary | |
E1305: Too many arguments for format string | |
E1306: Not enough arguments for format string | |
E1310: Suspicious argument in %s.%s call | |
F0001: (error prevented analysis; message varies) | |
F0002: %s: %s (message varies) | |
F0003: ignored builtin module %s | |
F0004: unexpected inferred value %s | |
F0010: error while code parsing: %s | |
F0202: Unable to check methods signature (%s / %s) | |
F0220: failed to resolve interfaces implemented by %s (%s) | |
F0321: Old: Format detection error in %r | |
F0401: Unable to import %s | |
I0001: Unable to run raw checkers on built-in module %s | |
I0010: Unable to consider inline option %r | |
I0011: Locally disabling %s | |
I0012: Locally enabling %s | |
I0013: Ignoring entire file | |
I0014: Used deprecated directive "pylint:disable-all" or "pylint:disable=all" | |
I0020: Suppressed %s (from line %d) | |
I0021: Useless suppression of %s | |
I0022: Deprecated pragma "pylint:disable-msg" or "pylint:enable-msg" | |
R0201: Method could be a function | |
R0401: Cyclic import (%s) | |
R0801: Similar lines in %s files | |
R0901: Too many ancestors (%s/%s) | |
R0902: Too many instance attributes (%s/%s) | |
R0903: Too few public methods (%s/%s) | |
R0904: Too many public methods (%s/%s) | |
R0911: Too many return statements (%s/%s) | |
R0912: Too many branches (%s/%s) | |
R0913: Too many arguments (%s/%s) | |
R0914: Too many local variables (%s/%s) | |
R0915: Too many statements (%s/%s) | |
R0921: Abstract class not referenced | |
R0922: Abstract class is only referenced %s times | |
R0923: Interface not implemented | |
W0101: Unreachable code | |
W0102: Dangerous default value %s as argument | |
W0104: Statement seems to have no effect | |
W0105: String statement has no effect | |
W0106: Expression "%s" is assigned to nothing | |
W0107: Unnecessary pass statement | |
W0108: Lambda may not be necessary | |
W0109: Duplicate key %r in dictionary | |
W0110: map/filter on lambda could be replaced by comprehension | |
W0120: Else clause on loop without a break statement | |
W0121: Use raise ErrorClass(args) instead of raise ErrorClass, args. | |
W0122: Use of exec | |
W0141: Used builtin function %r | |
W0142: Used * or ** magic | |
W0150: %s statement in finally block may swallow exception | |
W0199: Assert called on a 2-uple. Did you mean \'assert x,y\'? | |
W0201: Attribute %r defined outside __init__ | |
W0211: Static method with %r as first argument | |
W0212: Access to a protected member %s of a client class | |
W0221: Arguments number differs from %s method | |
W0222: Signature differs from %s method | |
W0223: Method %r is abstract in class %r but is not overridden | |
W0231: __init__ method from base class %r is not called | |
W0232: Class has no __init__ method | |
W0233: __init__ method from a non direct base class %r is called | |
W0234: iter returns non-iterator | |
W0301: Unnecessary semicolon | |
W0311: Bad indentation. Found %s %s, expected %s | |
W0312: Found indentation with %ss instead of %ss | |
W0331: Use of the <> operator | |
W0332: Use of "l" as long integer identifier | |
W0333: Use of the `` operator | |
W0401: Wildcard import %s | |
W0402: Uses of a deprecated module %r | |
W0403: Relative import %r, should be %r | |
W0404: Reimport %r (imported line %s) | |
W0406: Module import itself | |
W0410: __future__ import is not the first non docstring statement | |
W0511: (warning notes in code comments; message varies) | |
W0512: Cannot decode using encoding "%s", unexpected byte at position %d | |
W0601: Global variable %r undefined at the module level | |
W0602: Using global for %r but no assigment is done | |
W0603: Using the global statement | |
W0604: Using the global statement at the module level | |
W0611: Unused import %s | |
W0612: Unused variable %r | |
W0613: Unused argument %r | |
W0614: Unused import %s from wildcard import | |
W0621: Redefining name %r from outer scope (line %s) | |
W0622: Redefining built-in %r | |
W0623: Redefining name %r from %s in exception handler | |
W0631: Using possibly undefined loop variable %r | |
W0632: Possible unbalanced tuple unpacking with sequence%s: … | |
W0633: Attempting to unpack a non-sequence%s | |
W0701: Raising a string exception | |
W0702: No exception type(s) specified | |
W0703: Catching too general exception %s | |
W0704: Except doesn't do anything | |
W0710: Exception doesn't inherit from standard "Exception" class | |
W0711: Exception to catch is the result of a binary "%s" operation | |
W0712: Implicit unpacking of exceptions is not supported in Python 3 | |
W1001: Use of "property" on an old style class | |
W1111: Assigning to function call which only returns None | |
W1201: Specify string format arguments as logging function parameters | |
W1300: Format string dictionary key should be a string, not %s | |
W1301: Unused key %r in format string dictionary | |
W1401: Anomalous backslash in string: \'%s\'. String constant might be missing an r prefix. | |
W1402: Anomalous Unicode escape in byte string: \'%s\'. String constant might be missing an r or u prefix. | |
W1501: "%s" is not a valid mode for open. | |
RP0001: Messages by category | |
RP0002: % errors / warnings by module | |
RP0003: Messages | |
RP0004: Global evaluation | |
RP0101: Statistics by type | |
RP0401: External dependencies | |
RP0402: Modules dependencies graph | |
RP0701: Raw metrics | |
RP0801: Duplication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:blacklisted-name (C0102): *Black listed name "%s"* | |
Used when the name is listed in the black list (unauthorized names). | |
:invalid-name (C0103): *Invalid %s name "%s"%s* | |
Used when the name doesn't match the regular expression associated to its type | |
(constant, variable, class...). | |
:missing-docstring (C0111): *Missing %s docstring* | |
Used when a module, function, class or method has no docstring.Some special | |
methods like __init__ doesn't necessary require a docstring. | |
:empty-docstring (C0112): *Empty %s docstring* | |
Used when a module, function, class or method has an empty docstring (it would | |
be too easy ;). | |
:missing-module-attribute (C0121): *Missing required attribute "%s"* | |
Used when an attribute required for modules is missing. | |
:bad-classmethod-argument (C0202): *Class method %s should have %s as first 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. | |
:bad-mcs-method-argument (C0203): *Metaclass method %s should have %s as first argument* | |
Used when a metaclass method has a first agument named differently than the | |
value specified in valid-classmethod-first-arg option (default to "cls"), | |
recommended to easily differentiate them from regular instance methods. | |
:bad-mcs-classmethod-argument (C0204): *Metaclass class method %s should have %s as first argument* | |
Used when a metaclass class method has a first argument named differently than | |
the value specified in valid-metaclass-classmethod-first-arg option (default | |
to "mcs"), recommended to easily differentiate them from regular instance | |
methods. | |
:line-too-long (C0301): *Line too long (%s/%s)* | |
Used when a line is longer than a given number of characters. | |
:too-many-lines (C0302): *Too many lines in module (%s)* | |
Used when a module has too much lines, reducing its readability. | |
:trailing-whitespace (C0303): *Trailing whitespace* | |
Used when there is whitespace between the end of a line and the newline. | |
:missing-final-newline (C0304): *Final newline missing* | |
Used when the last line in a file is missing a newline. | |
:multiple-statements (C0321): *More than one statement on a single line* | |
Used when more than on statement are found on the same line. | |
:superfluous-parens (C0325): *Unnecessary parens after %r keyword* | |
Used when a single item in parentheses follows an if, for, or other keyword. | |
:bad-whitespace (C0326): *%s space %s %s %s* | |
Used when a wrong number of spaces is used around an operator, bracket or | |
block opener. | |
:bad-continuation (C0330): *Wrong %s indentation%s.* | |
TODO | |
:old-style-class (C1001): *Old-style class defined.* | |
Used when a class is defined that does not inherit from anotherclass and does | |
not inherit explicitly from "object". This message can't be emitted when using | |
Python >= 3.0. | |
:syntax-error (E0001): | |
Used when a syntax error is raised for a module. | |
:unrecognized-inline-option (E0011): *Unrecognized file option %r* | |
Used when an unknown inline option is encountered. | |
:bad-option-value (E0012): *Bad option value %r* | |
Used when a bad value for an inline option is encountered. | |
:init-is-generator (E0100): *__init__ method is a generator* | |
Used when the special class method __init__ is turned into a generator by a | |
yield in its body. | |
:return-in-init (E0101): *Explicit return in __init__* | |
Used when the special class method __init__ has an explicit return value. | |
:function-redefined (E0102): *%s already defined line %s* | |
Used when a function / class / method is redefined. | |
:not-in-loop (E0103): *%r not properly in loop* | |
Used when break or continue keywords are used outside a loop. | |
:return-outside-function (E0104): *Return outside function* | |
Used when a "return" statement is found outside a function or method. | |
:yield-outside-function (E0105): *Yield outside function* | |
Used when a "yield" statement is found outside a function or method. | |
:return-arg-in-generator (E0106): *Return with argument inside generator* | |
Used when a "return" statement with an argument is found outside in a | |
generator function or method (e.g. with some "yield" statements). This message | |
can't be emitted when using Python >= 3.3. | |
:nonexistent-operator (E0107): *Use of the non-existent %s operator* | |
Used when you attempt to use the C-style pre-increment orpre-decrement | |
operator -- and ++, which doesn't exist in Python. | |
:duplicate-argument-name (E0108): *Duplicate argument name %s in function definition* | |
Duplicate argument names in function definitions are syntax errors. | |
:missing-reversed-argument (E0109): *Missing argument to reversed()* | |
Used when reversed() builtin didn't receive an argument. | |
:bad-reversed-sequence (E0111): *The first reversed() argument is not a sequence* | |
Used when the first argument to reversed() builtin isn't a sequence (does not | |
implement __reversed__, nor __getitem__ and __len__ | |
:method-hidden (E0202): *An attribute defined in %s line %s hides this method* | |
Used when a class defines a method which is hidden by an instance attribute | |
from an ancestor class or set by some client code. | |
:access-member-before-definition (E0203): *Access to member %r before its definition line %s* | |
Used when an instance member is accessed before it's actually assigned. | |
:no-method-argument (E0211): *Method has no argument* | |
Used when a method which should have the bound instance as first argument has | |
no argument defined. | |
:no-self-argument (E0213): *Method should have "self" as first 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! | |
:interface-is-not-class (E0221): *Interface resolved to %s is not a class* | |
Used when a class claims to implement an interface which is not a class. | |
:missing-interface-method (E0222): *Missing method %r from %s interface* | |
Used when a method declared in an interface is missing from a class | |
implementing this interface | |
:bad-context-manager (E0235): *__exit__ must 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). | |
:invalid-slots-object (E0236): *Invalid object %r in __slots__, must contain only non empty strings* | |
Used when an invalid (non-string) object occurs in __slots__. | |
:assigning-non-slot (E0237): *Assigning to attribute %r not defined in class slots* | |
Used when assigning to an attribute not defined in the class slots. | |
:invalid-slots (E0238): *Invalid __slots__ object* | |
Used when an invalid __slots__ is found in class. Only a string, an iterable | |
or a sequence is permitted. | |
:used-before-assignment (E0601): *Using variable %r before assignment* | |
Used when a local variable is accessed before it's assignment. | |
:undefined-variable (E0602): *Undefined variable %r* | |
Used when an undefined variable is accessed. | |
:undefined-all-variable (E0603): *Undefined variable name %r in __all__* | |
Used when an undefined variable name is referenced in __all__. | |
:invalid-all-object (E0604): *Invalid object %r in __all__, must contain only strings* | |
Used when an invalid (non-string) object occurs in __all__. | |
:no-name-in-module (E0611): *No name %r in module %r* | |
Used when a name cannot be found in a module. | |
:bad-except-order (E0701): *Bad except clauses order (%s)* | |
Used when except clauses are not in the correct order (from the more specific | |
to the more generic). If you don't fix the order, some exceptions may not be | |
catched by the most specific handler. | |
:raising-bad-type (E0702): *Raising %s while only classes, instances or string are allowed* | |
Used when something which is neither a class, an instance or a string is | |
raised (i.e. a `TypeError` will be raised). | |
:raising-non-exception (E0710): *Raising a new style class which doesn't inherit from BaseException* | |
Used when a new style class which doesn't inherit from BaseException is | |
raised. | |
:notimplemented-raised (E0711): *NotImplemented raised - should raise NotImplementedError* | |
Used when NotImplemented is raised instead of NotImplementedError | |
:catching-non-exception (E0712): *Catching an exception which doesn't inherit from BaseException: %s* | |
Used when a class which doesn't inherit from BaseException is used as an | |
exception in an except clause. | |
:slots-on-old-class (E1001): *Use of __slots__ on an old style class* | |
Used when an old style class uses the __slots__ attribute. This message can't | |
be emitted when using Python >= 3.0. | |
:super-on-old-class (E1002): *Use of super on an old style class* | |
Used when an old style class uses the super builtin. This message can't be | |
emitted when using Python >= 3.0. | |
:bad-super-call (E1003): *Bad first argument %r given to super()* | |
Used when another argument than the current class is given as first argument | |
of the super builtin. | |
:missing-super-argument (E1004): *Missing argument to super()* | |
Used when the super builtin didn't receive an argument. This message can't be | |
emitted when using Python >= 3.0. | |
:no-member (E1101): *%s %r has no %r member* | |
Used when a variable is accessed for an unexistent member. | |
:not-callable (E1102): *%s is not callable* | |
Used when an object being called has been inferred to a non callable object | |
:maybe-no-member (E1103): *%s %r has no %r member (but some types could not be inferred)* | |
Used when a variable is accessed for an unexistent member, but astroid was not | |
able to interpret all possible types of this variable. | |
:assignment-from-no-return (E1111): *Assigning to function call which doesn't return* | |
Used when an assignment is done on a function call but the inferred function | |
doesn't return anything. | |
:no-value-for-parameter (E1120): *No value for argument %s in %s call* | |
Used when a function call passes too few arguments. | |
:too-many-function-args (E1121): *Too many positional arguments for %s call* | |
Used when a function call passes too many positional arguments. | |
:unexpected-keyword-arg (E1123): *Unexpected keyword argument %r in %s call* | |
Used when a function call passes a keyword argument that doesn't correspond to | |
one of the function's parameter names. | |
:redundant-keyword-arg (E1124): *Argument %r passed by position and keyword in %s call* | |
Used when a function call would result in assigning multiple values to a | |
function parameter, one value from a positional argument and one from a | |
keyword argument. | |
:invalid-sequence-index (E1126): *Sequence index is not an int, slice, or instance with __index__* | |
Used when a sequence type is indexed with an invalid type. Valid types are | |
ints, slices, and objects with an __index__ method. | |
:invalid-slice-index (E1127): *Slice index is not an int, None, or instance with __index__* | |
Used when a slice index is not an integer, None, or an object with an | |
__index__ method. | |
:logging-unsupported-format (E1200): *Unsupported logging format character %r (%#02x) at index %d* | |
Used when an unsupported format character is used in a logging statement | |
format string. | |
:logging-format-truncated (E1201): *Logging format string ends in middle of conversion specifier* | |
Used when a logging statement format string terminates before the end of a | |
conversion specifier. | |
:logging-too-many-args (E1205): *Too many arguments for logging format string* | |
Used when a logging format string is given too few arguments. | |
:logging-too-few-args (E1206): *Not enough arguments for logging format string* | |
Used when a logging format string is given too many arguments | |
:bad-format-character (E1300): *Unsupported format character %r (%#02x) at index %d* | |
Used when a unsupported format character is used in a format string. | |
:truncated-format-string (E1301): *Format string ends in middle of conversion specifier* | |
Used when a format string terminates before the end of a conversion specifier. | |
:mixed-format-string (E1302): *Mixing named and unnamed conversion specifiers in format string* | |
Used when a format string contains both named (e.g. '%(foo)d') and unnamed | |
(e.g. '%d') conversion specifiers. This is also used when a named conversion | |
specifier contains * for the minimum field width and/or precision. | |
:format-needs-mapping (E1303): *Expected mapping for format string, not %s* | |
Used when a format string that uses named conversion specifiers is used with | |
an argument that is not a mapping. | |
:missing-format-string-key (E1304): *Missing key %r in format string dictionary* | |
Used when a format string that uses named conversion specifiers is used with a | |
dictionary that doesn't contain all the keys required by the format string. | |
:too-many-format-args (E1305): *Too many arguments for format string* | |
Used when a format string that uses unnamed conversion specifiers is given too | |
many arguments. | |
:too-few-format-args (E1306): *Not enough arguments for format string* | |
Used when a format string that uses unnamed conversion specifiers is given too | |
few arguments | |
:bad-str-strip-call (E1310): *Suspicious argument in %s.%s call* | |
The argument to a str.{l,r,}strip call contains a duplicate character, | |
:fatal (F0001): | |
Used when an error occurred preventing the analysis of a module (unable to | |
find it for instance). | |
:astroid-error (F0002): *%s: %s* | |
Used when an unexpected error occurred while building the Astroid | |
representation. This is usually accompanied by a traceback. Please report such | |
errors ! | |
:ignored-builtin-module (F0003): *ignored builtin module %s* | |
Used to indicate that the user asked to analyze a builtin module which has | |
been skipped. | |
:parse-error (F0010): *error while code parsing: %s* | |
Used when an exception occured while building the Astroid representation which | |
could be handled by astroid. | |
:method-check-failed (F0202): *Unable to check methods signature (%s / %s)* | |
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. | |
:unresolved-interface (F0220): *failed to resolve interfaces implemented by %s (%s)* | |
Used when a PyLint as failed to find interfaces implemented by a class | |
:import-error (F0401): *Unable to import %s* | |
Used when pylint has been unable to import a module. | |
:raw-checker-failed (I0001): *Unable to run raw checkers on built-in module %s* | |
Used to inform that a built-in module has not been checked using the raw | |
checkers. | |
:bad-inline-option (I0010): *Unable to consider inline option %r* | |
Used when an inline option is either badly formatted or can't be used inside | |
modules. | |
:locally-disabled (I0011): *Locally disabling %s (%s)* | |
Used when an inline option disables a message or a messages category. | |
:locally-enabled (I0012): *Locally enabling %s (%s)* | |
Used when an inline option enables a message or a messages category. | |
:file-ignored (I0013): *Ignoring entire file* | |
Used to inform that the file will not be checked | |
:suppressed-message (I0020): *Suppressed %s (from line %d)* | |
A message was triggered on a line, but suppressed explicitly by a disable= | |
comment in the file. This message is not generated for messages that are | |
ignored due to configuration settings. | |
:useless-suppression (I0021): *Useless suppression of %s* | |
Reported when a message is explicitly disabled for a line or a block of code, | |
but never triggered. | |
:deprecated-pragma (I0022): *Pragma "%s" is deprecated, use "%s" instead* | |
Some inline pylint options have been renamed or reworked, only the most recent | |
form should be used. NOTE:skip-all is only available with pylint >= 0.26 | |
:no-self-use (R0201): *Method could be a function* | |
Used when a method doesn't use its bound instance, and so could be written as | |
a function. | |
:cyclic-import (R0401): *Cyclic import (%s)* | |
Used when a cyclic import between two or more modules is detected. | |
:duplicate-code (R0801): *Similar lines in %s files* | |
Indicates that a set of similar lines has been detected among multiple file. | |
This usually means that the code should be refactored to avoid this | |
duplication. | |
:too-many-ancestors (R0901): *Too many ancestors (%s/%s)* | |
Used when class has too many parent classes, try to reduce this to get a | |
simpler (and so easier to use) class. | |
:too-many-instance-attributes (R0902): *Too many instance attributes (%s/%s)* | |
Used when class has too many instance attributes, try to reduce this to get a | |
simpler (and so easier to use) class. | |
:too-few-public-methods (R0903): *Too few public methods (%s/%s)* | |
Used when class has too few public methods, so be sure it's really worth it. | |
:too-many-public-methods (R0904): *Too many public methods (%s/%s)* | |
Used when class has too many public methods, try to reduce this to get a | |
simpler (and so easier to use) class. | |
:too-many-return-statements (R0911): *Too many return statements (%s/%s)* | |
Used when a function or method has too many return statement, making it hard | |
to follow. | |
:too-many-branches (R0912): *Too many branches (%s/%s)* | |
Used when a function or method has too many branches, making it hard to | |
follow. | |
:too-many-arguments (R0913): *Too many arguments (%s/%s)* | |
Used when a function or method takes too many arguments. | |
:too-many-locals (R0914): *Too many local variables (%s/%s)* | |
Used when a function or method has too many local variables. | |
:too-many-statements (R0915): *Too many statements (%s/%s)* | |
Used when a function or method has too many statements. You should then split | |
it in smaller functions / methods. | |
:abstract-class-not-used (R0921): *Abstract class not referenced* | |
Used when an abstract class is not used as ancestor anywhere. | |
:abstract-class-little-used (R0922): *Abstract class is only referenced %s times* | |
Used when an abstract class is used less than X times as ancestor. | |
:interface-not-implemented (R0923): *Interface not implemented* | |
Used when an interface class is not implemented anywhere. | |
:unreachable (W0101): *Unreachable code* | |
Used when there is some code behind a "return" or "raise" statement, which | |
will never be accessed. | |
:dangerous-default-value (W0102): *Dangerous default value %s as argument* | |
Used when a mutable value as list or dictionary is detected in a default value | |
for an argument. | |
:pointless-statement (W0104): *Statement seems to have no effect* | |
Used when a statement doesn't have (or at least seems to) any effect. | |
:pointless-string-statement (W0105): *String statement has no effect* | |
Used when a string is used as a statement (which of course has no effect). | |
This is a particular case of W0104 with its own message so you can easily | |
disable it if you're using those strings as documentation, instead of | |
comments. | |
:expression-not-assigned (W0106): *Expression "%s" is assigned to nothing* | |
Used when an expression that is not a function call is assigned to nothing. | |
Probably something else was intended. | |
:unnecessary-pass (W0107): *Unnecessary pass statement* | |
Used when a "pass" statement that can be avoided is encountered. | |
:unnecessary-lambda (W0108): *Lambda may not be necessary* | |
Used when the body of a lambda expression is a function call on the same | |
argument list as the lambda itself; such lambda expressions are in all but a | |
few cases replaceable with the function being called in the body of the | |
lambda. | |
:duplicate-key (W0109): *Duplicate key %r in dictionary* | |
Used when a dictionary expression binds the same key multiple times. | |
:deprecated-lambda (W0110): *map/filter on lambda could be replaced by comprehension* | |
Used when a lambda is the first argument to "map" or "filter". It could be | |
clearer as a list comprehension or generator expression. This message can't be | |
emitted when using Python >= 3.0. | |
:useless-else-on-loop (W0120): *Else clause on loop without a break statement* | |
Loops should only have an else clause if they can exit early with a break | |
statement, otherwise the statements under else should be on the same scope as | |
the loop itself. | |
:old-raise-syntax (W0121): *Use raise ErrorClass(args) instead of raise ErrorClass, args.* | |
Used when the alternate raise syntax 'raise foo, bar' is used instead of | |
'raise foo(bar)'. This message can't be emitted when using Python >= 3.0. | |
:exec-used (W0122): *Use of exec* | |
Used when you use the "exec" statement (function for Python 3), to discourage | |
its usage. That doesn't mean you can not use it ! | |
:eval-used (W0123): *Use of eval* | |
Used when you use the "eval" function, to discourage its usage. Consider using | |
`ast.literal_eval` for safely evaluating strings containing Python expressions | |
from untrusted sources. | |
:bad-builtin (W0141): *Used builtin function %r* | |
Used when a black listed builtin function is used (see the bad-function | |
option). Usual black listed functions are the ones like map, or filter , where | |
Python offers now some cleaner alternative like list comprehension. | |
:star-args (W0142): *Used * or ** magic* | |
Used when a function or method is called using `*args` or `**kwargs` to | |
dispatch arguments. This doesn't improve readability and should be used with | |
care. | |
:lost-exception (W0150): *%s statement in finally block may swallow exception* | |
Used when a break or a return statement is found inside the finally clause of | |
a try...finally block: the exceptions raised in the try clause will be | |
silently swallowed instead of being re-raised. | |
:assert-on-tuple (W0199): *Assert called on a 2-uple. Did you mean 'assert x,y'?* | |
A call of assert on a tuple will always evaluate to true if the tuple is not | |
empty, and will always evaluate to false if it is. | |
:attribute-defined-outside-init (W0201): *Attribute %r defined outside __init__* | |
Used when an instance attribute is defined outside the __init__ method. | |
:bad-staticmethod-argument (W0211): *Static method with %r as first argument* | |
Used when a static method has "self" or a value specified in | |
valid-classmethod-first-arg option or valid-metaclass-classmethod-first-arg | |
option as first argument. | |
:protected-access (W0212): *Access to a protected member %s of a client class* | |
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. | |
:arguments-differ (W0221): *Arguments number differs from %s method* | |
Used when a method has a different number of arguments than in the implemented | |
interface or in an overridden method. | |
:signature-differs (W0222): *Signature differs from %s method* | |
Used when a method signature is different than in the implemented interface or | |
in an overridden method. | |
:abstract-method (W0223): *Method %r is abstract in class %r but is not overridden* | |
Used when an abstract method (i.e. raise NotImplementedError) is not | |
overridden in concrete class. | |
:super-init-not-called (W0231): *__init__ method from base class %r is not called* | |
Used when an ancestor class method has an __init__ method which is not called | |
by a derived class. | |
:no-init (W0232): *Class has no __init__ method* | |
Used when a class has no __init__ method, neither its parent classes. | |
:non-parent-init-called (W0233): *__init__ method from a non direct base class %r is called* | |
Used when an __init__ method is called on a class which is not in the direct | |
ancestors for the analysed class. | |
:non-iterator-returned (W0234): *__iter__ returns non-iterator* | |
Used when an __iter__ method returns something which is not an iterable (i.e. | |
has no `next` method) | |
:unnecessary-semicolon (W0301): *Unnecessary semicolon* | |
Used when a statement is ended by a semi-colon (";"), which isn't necessary | |
(that's python, not C ;). | |
:bad-indentation (W0311): *Bad indentation. Found %s %s, expected %s* | |
Used when an unexpected number of indentation's tabulations or spaces has been | |
found. | |
:mixed-indentation (W0312): *Found indentation with %ss instead of %ss* | |
Used when there are some mixed tabs and spaces in a module. | |
:old-ne-operator (W0331): *Use of the <> operator* | |
Used when the deprecated "<>" operator is used instead of "!=". This message | |
can't be emitted when using Python >= 3.0. | |
:lowercase-l-suffix (W0332): *Use of "l" as long integer identifier* | |
Used when a lower case "l" is used to mark a long integer. You should use a | |
upper case "L" since the letter "l" looks too much like the digit "1" This | |
message can't be emitted when using Python >= 3.0. | |
:backtick (W0333): *Use of the `` operator* | |
Used when the deprecated "``" (backtick) operator is used instead of the str() | |
function. This message can't be emitted when using Python >= 3.0. | |
:wildcard-import (W0401): *Wildcard import %s* | |
Used when `from module import *` is detected. | |
:deprecated-module (W0402): *Uses of a deprecated module %r* | |
Used a module marked as deprecated is imported. | |
:relative-import (W0403): *Relative import %r, should be %r* | |
Used when an import relative to the package directory is detected. This | |
message can't be emitted when using Python >= 3.0. | |
:reimported (W0404): *Reimport %r (imported line %s)* | |
Used when a module is reimported multiple times. | |
:import-self (W0406): *Module import itself* | |
Used when a module is importing itself. | |
:misplaced-future (W0410): *__future__ import is not the first non docstring statement* | |
Python 2.5 and greater require __future__ import to be the first non docstring | |
statement in the module. This message can't be emitted when using Python >= | |
3.0. | |
:fixme (W0511): | |
Used when a warning note as FIXME or XXX is detected. | |
:invalid-encoded-data (W0512): *Cannot decode using encoding "%s", unexpected byte at position %d* | |
Used when a source line cannot be decoded using the specified source file | |
encoding. This message can't be emitted when using Python >= 3.0. | |
:global-variable-undefined (W0601): *Global variable %r undefined at the module level* | |
Used when a variable is defined through the "global" statement but the | |
variable is not defined in the module scope. | |
:global-variable-not-assigned (W0602): *Using global for %r but no assignment is done* | |
Used when a variable is defined through the "global" statement but no | |
assignment to this variable is done. | |
:global-statement (W0603): *Using the global statement* | |
Used when you use the "global" statement to update a global variable. PyLint | |
just try to discourage this usage. That doesn't mean you can not use it ! | |
:global-at-module-level (W0604): *Using the global statement at the module level* | |
Used when you use the "global" statement at the module level since it has no | |
effect | |
:unused-import (W0611): *Unused import %s* | |
Used when an imported module or variable is not used. | |
:unused-variable (W0612): *Unused variable %r* | |
Used when a variable is defined but not used. | |
:unused-argument (W0613): *Unused argument %r* | |
Used when a function or method argument is not used. | |
:unused-wildcard-import (W0614): *Unused import %s from wildcard import* | |
Used when an imported module or variable is not used from a 'from X import *' | |
style import. | |
:redefined-outer-name (W0621): *Redefining name %r from outer scope (line %s)* | |
Used when a variable's name hide a name defined in the outer scope. | |
:redefined-builtin (W0622): *Redefining built-in %r* | |
Used when a variable or function override a built-in. | |
:redefine-in-handler (W0623): *Redefining name %r from %s in exception handler* | |
Used when an exception handler assigns the exception to an existing name | |
:undefined-loop-variable (W0631): *Using possibly undefined loop variable %r* | |
Used when an loop variable (i.e. defined by a for loop or a list comprehension | |
or a generator expression) is used outside the loop. | |
:unbalanced-tuple-unpacking (W0632): *Possible unbalanced tuple unpacking with sequence%s: left side has %d label(s), right side has %d value(s)* | |
Used when there is an unbalanced tuple unpacking in assignment | |
:unpacking-non-sequence (W0633): *Attempting to unpack a non-sequence%s* | |
Used when something which is not a sequence is used in an unpack assignment | |
:cell-var-from-loop (W0640): *Cell variable %s defined in loop* | |
A variable used in a closure is defined in a loop. This will result in all | |
closures using the same value for the closed-over variable. | |
:raising-string (W0701): *Raising a string exception* | |
Used when a string exception is raised. | |
:bare-except (W0702): *No exception type(s) specified* | |
Used when an except clause doesn't specify exceptions type to catch. | |
:broad-except (W0703): *Catching too general exception %s* | |
Used when an except catches a too general exception, possibly burying | |
unrelated errors. | |
:pointless-except (W0704): *Except doesn't do anything* | |
Used when an except clause does nothing but "pass" and there is no "else" | |
clause. | |
:nonstandard-exception (W0710): *Exception doesn't inherit from standard "Exception" class* | |
Used when a custom exception class is raised but doesn't inherit from the | |
builtin "Exception" class. This message can't be emitted when using Python >= | |
3.0. | |
:binary-op-exception (W0711): *Exception to catch is the result of a binary "%s" operation* | |
Used when the exception to catch is of the form "except A or B:". If intending | |
to catch multiple, rewrite as "except (A, B):" | |
:unpacking-in-except (W0712): *Implicit unpacking of exceptions is not supported in Python 3* | |
Python3 will not allow implicit unpacking of exceptions in except clauses. See | |
http://www.python.org/dev/peps/pep-3110/ This message can't be emitted when | |
using Python >= 3.0. | |
:indexing-exception (W0713): *Indexing exceptions will not work on Python 3* | |
Indexing exceptions will not work on Python 3. Use `exception.args[index]` | |
instead. This message can't be emitted when using Python >= 3.0. | |
:property-on-old-class (W1001): *Use of "property" on an old style class* | |
Used when PyLint detect the use of the builtin "property" on an old style | |
class while this is relying on new style classes features. This message can't | |
be emitted when using Python >= 3.0. | |
:assignment-from-none (W1111): *Assigning to function call which only returns None* | |
Used when an assignment is done on a function call but the inferred function | |
returns nothing but None. | |
:logging-not-lazy (W1201): *Specify string format arguments as logging function parameters* | |
Used when a logging statement has a call form of "logging.<logging | |
method>(format_string % (format_args...))". Such calls should leave string | |
interpolation to the logging method itself and be written "logging.<logging | |
method>(format_string, format_args...)" so that the program may avoid | |
incurring the cost of the interpolation in those cases in which no message | |
will be logged. For more, see http://www.python.org/dev/peps/pep-0282/. | |
:bad-format-string-key (W1300): *Format string dictionary key should be a string, not %s* | |
Used when a format string that uses named conversion specifiers is used with a | |
dictionary whose keys are not all strings. | |
:unused-format-string-key (W1301): *Unused key %r in format string dictionary* | |
Used when a format string that uses named conversion specifiers is used with a | |
dictionary that conWtains keys not required by the format string. | |
:bad-format-string (W1302): *Invalid format string* | |
Used when a PEP 3101 format string is invalid. This message can't be emitted | |
when using Python < 2.7. | |
:missing-format-argument-key (W1303): *Missing keyword argument %r for format string* | |
Used when a PEP 3101 format string that uses named fields doesn't receive one | |
or more required keywords. This message can't be emitted when using Python < | |
2.7. | |
:unused-format-string-argument (W1304): *Unused format argument %r* | |
Used when a PEP 3101 format string that uses named fields is used with an | |
argument that is not required by the format string. This message can't be | |
emitted when using Python < 2.7. | |
:format-combined-specification (W1305): *Format string contains both automatic field numbering and manual field specification* | |
Usen when a PEP 3101 format string contains both automatic field numbering | |
(e.g. '{}') and manual field specification (e.g. '{0}'). This message can't be | |
emitted when using Python < 2.7. | |
:missing-format-attribute (W1306): *Missing format attribute %r in format specifier %r* | |
Used when a PEP 3101 format string uses an attribute specifier ({0.length}), | |
but the argument passed for formatting doesn't have that attribute. This | |
message can't be emitted when using Python < 2.7. | |
:invalid-format-index (W1307): *Using invalid lookup key %r in format specifier %r* | |
Used when a PEP 3101 format string uses a lookup specifier ({a[1]}), but the | |
argument passed for formatting doesn't contain or doesn't have that key as an | |
attribute. This message can't be emitted when using Python < 2.7. | |
:anomalous-backslash-in-string (W1401): *Anomalous backslash in string: '%s'. String constant might be missing an r prefix.* | |
Used when a backslash is in a literal string but not as an escape. | |
:anomalous-unicode-escape-in-string (W1402): *Anomalous Unicode escape in byte string: '%s'. String constant might be missing an r or u prefix.* | |
Used when an escape like \u is encountered in a byte string where it has no | |
effect. | |
:bad-open-mode (W1501): *"%s" is not a valid mode for open.* | |
Python supports: r, w, a modes with b, +, and U options. See | |
http://docs.python.org/2/library/functions.html#open | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment