Non-ASCII characters are now allowed by ``invalid-name`` check.
Also this commit adds a new check ``non-ascii-name``, which is used
to detect identifiers with non-ASCII characters.
This commit adds a new `notes-rgx` which is used by the "fixme" check for more
granular control over the what fixme messages to emit.
Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
This check is emitted whenever **pylint** finds an assert statement
with a string literal as its first argument. Such assert statements
are probably unintended as they will always pass.
Close#3284
Quoting PEP-8:
In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this. Pick a rule and stick to it. When a string contains single or double quote characters, however, use the other one to avoid backslashes in the string. It improves readability.
For triple-quoted strings, always use double quote characters to be consistent with the docstring convention in PEP 257.
Features:
Accounts for strings where the delimiter is swapped so an internal quote doesn't need to be escaped
Only errors on those lines that represent the module's minority delimiter.
Ignores longstrings (they could be docstrings, and checking those delimiters is someone else's responsibility)
This commit adds multiple checks for various Python protocols
E0304 (invalid-bool-returned): __bool__ did not return a bool
E0305 (invalid-index-returned): __index__ did not return an integer
E0306 (invalid-repr-returned): __repr__ did not return a string
E0307 (invalid-str-returned): __str__ did not return a string
E0308 (invalid-bytes-returned): __bytes__ did not return a string
E0309 (invalid-hash-returned): __hash__ did not return an integer
E0310 (invalid-length-hint-returned): __length_hint__ did not return a non-negative integer
E0311 (invalid-format-returned): __format__ did not return a string
E0312 (invalid-getnewargs-returned): __getnewargs__ did not return a tuple
E0313 (invalid-getnewargs-ex-returned): __getnewargs_ex__ did not return a tuple of the form (tuple, dict)
Close#560
Add a --fail-under <score> flag, also configurable in a `.pylintrc`file
If the final score is more than the specified score, it's considered a
success and pylint exits with exit code 0. Otherwise, it's considered
a failure and pylint exits with its current exit code based on the
messages issued.
Close#2242
This commit adds support for disabling `line-too-long` messages
for multilines strings such as docstrings.
When a pylint disable pragma is present at the end of the docstring, it is taken
in account for the entire docstring.
Close#2957
To enable better handling of whitelisting/blacklisting names, we added two new
config options: `good-names-rgxs` and `bad-names-rgxs`. They both
are a comma-separated list of regexes, where the former is used for exempting
names from name checking while the latter is used for always marking a name
as blacklisted.
When enabling/disabling several messages and groups in a config
file, it can be unclear which messages are actually enabled and
which are disabled. This new command produces the final resolved
lists of enabled/disabled messages, sorted by symbol but with the
ID provided for use with `--help-msg`.
This commit includes a test, documentation, and adding myself to
the contributors list, as this is my first contribution.
The implementation successfully warns against the most obvious cases
where named variables are supplied to a function that all match a
function's positional argument, but are in the wrong order.
There are some additional corner cases that need to be addresses, such
as call sites that are not typical function calls.
Added additional checking for the presence of `self` arguments when
calling instance attributes.
Refactored the check into its own function so that we can bail out
cleanly with a return if needed.
Close#2975
This check is emitted when we detect that a method is overridden
as a property or a property is overridden as a method. This can indicate
a bug in the application code that will trigger a runtime error.
Close#2670
This check is emitted when ``pylint`` detects that a name
was assigned one or multiple times in the same assignment,
which indicate a potential bug.
Close#2898
This is emitted in case a call to a function is made inside a test but it misses parentheses.
It is a more specialised form of `using-constant-test`, but tailored specifically to callables.
Close#2658