- Release
2.14
- Date
TBA
Added new checker
typevar-name-mismatch
: TypeVar must be assigned to a variable with the same name as its name argument.Closes #5224
invalid-enum-extension
: Used when a class tries to extend an inherited Enum class.Closes #5501
Added new checker
typevar-double-variance
: The "covariant" and "contravariant" keyword arguments cannot both be set to "True" in a TypeVar.Closes #5895
Add new check
unnecessary-dunder-call
for unnecessary dunder method calls.Closes #5936
potential-index-error
: Emitted when the index of a list or tuple exceeds its length. This checker is currently quite conservative to avoid false positives. We welcome suggestions for improvements.Closes #578
Added new checker
unnecessary-list-index-lookup
for indexing into a list while iterating overenumerate()
.Closes #4525
Added new message called
duplicate-value
which identifies duplicate values inside sets.Closes #5880
Added the
super-without-brackets
checker, raised when a super call is missing its brackets.Closes #4008
The
no-init
(W0232) warning has been removed. It's ok to not have an__init__
in a class.Closes #2409
DocStringStyleChecker
Re-enable checker
bad-docstring-quotes
for Python <= 3.7.Closes #6087
Pylint
now requires Python 3.7.2 or newer to run.Closes #4301
Update
invalid-slots-object
message to show bad object rather than its inferred value.Closes #6101
- Fix a failure to respect inline disables for
fixme
occurring on the last line of a module when pylint is launched with--enable=fixme
. Removed the broken
generate-man
option.Closes #5283 Closes #1887
- Fixed failure to enable
deprecated-module
after adisable=all
by makingImportsChecker
solely responsible for emittingdeprecated-module
instead of sharing responsibility withStdlibChecker
. (This could have led to double messages.) The
config
attribute ofBaseChecker
has been deprecated. You can usechecker.linter.config
to access the global configuration object instead of a checker-specific object.Ref #5392
The
level
attribute ofBaseChecker
has been deprecated: everything is now displayed in--help
, all the time.Ref #5392
The
set_option
method ofBaseChecker
has been deprecated. You can usechecker.linter.set_option
to set an option on the global configuration object instead of a checker-specific object.Ref #5392
The
options_providers
attribute ofArgumentsManager
has been deprecated.Ref #5392
The
config
attribute ofPyLinter
is now of theargparse.Namespace
type instead ofoptparse.Values
.Ref #5392
UnsupportedAction
has been deprecated.Ref #5392
OptionsManagerMixIn
has been deprecated.Ref #5392
OptionParser
has been deprecated.Ref #5392
Option
has been deprecated.Ref #5392
OptionsProviderMixIn
has been deprecated.Ref #5392
ConfigurationMixIn
has been deprecated.The
option_groups
attribute ofPyLinter
has been deprecated.Ref #5392
get_global_config
has been deprecated. You can now access all global options fromchecker.linter.config
.Ref #5392
OptionsManagerMixIn
has been replaced withArgumentsManager
.ArgumentsManager
is considered private API and most methods that were public onOptionsManagerMixIn
have now been deprecated and will be removed in a future release.Ref #5392
OptionsProviderMixIn
has been replaced withArgumentsProvider
.ArgumentsProvider
is considered private API and most methods that were public onOptionsProviderMixIn
have now been deprecated and will be removed in a future release.Ref #5392
Added the
generate-toml-config
option.Ref #5462
bad-option-value
will be emitted whenever a configuration value or command line invocation includes an unknown message.Closes #4324
Added the
unrecognized-option
message. Raised if we encounter any unrecognized options.Closes #5259
- Fix false negative for
bad-string-format-type
if the value to be formatted is passed in as a variable holding a constant. - The concept of checker priority has been removed.
The
cache-max-size-none
checker has been renamed tomethod-cache-max-size-none
.Closes #5670
The
method-cache-max-size-none
checker will now also checkfunctools.cache
.Closes #5670
BaseChecker
classes now require thelinter
argument to be passed.- The
set_config_directly
decorator has been removed. The
ignore-mixin-members
option has been deprecated. You should now use the newignored-checks-for-mixins
option.Closes #5205
Fix false positive for
unsubscriptable-object
in Python 3.8 and below for statements guarded byif TYPE_CHECKING
.Closes #3979
Fix false negative for
no-member
when attempting to assign an instance attribute to itself without any prior assignment.Closes #1555