Full changelog¶
What's New in Pylint 2.11.1?¶
Release date: 2021-09-16
unspecified-encodingnow checks the encoding ofpathlib.Path()correctlyCloses #5017
What's New in Pylint 2.11.0?¶
Release date: 2021-09-16
The python3 porting mode checker and it's
py3koption were removed. You can still find it in older pylint versions.raising-bad-typeis now properly emitted when raising a stringAdded new extension
SetMembershipCheckerwithuse-set-for-membershipcheck: Emitted when using an in-place definedlistortupleto do a membership test.setsare better optimized for that.Closes #4776
Added
py-versionconfig key (if[MASTER]section). Used for version dependent checks. Will default to whatever Python version pylint is executed with.CodeStyleChecker: Addedconsider-using-assignment-expr: Emitted when an assignment is directly followed by an if statement and both can be combined by using an assignment expression:=. Requires Python 3.8Closes #4862
Added
consider-using-f-string: Emitted when .format() or '%' is being used to format a string.Closes #3592
Fix false positive for
consider-using-withif a context manager is assigned to a variable in different paths of control flow (e. g. if-else clause).Closes #4751
https is now preferred in the documentation and http://pylint.pycqa.org correctly redirect to https://pylint.pycqa.org
Closes #3802
Fix false positive for
function-redefinedfor simple type annotationsCloses #4936
Fix false positive for
protected-accessif a protected member is used in type hints of function definitionsFix false positive
dict-iter-missing-itemsfor dictionaries only using tuples as keysCloses #3282
The
unspecified-encodingchecker now also checks calls topathlib.Path().read_text()andpathlib.Path().write_text()Closes #4945
Fix false positive
superfluous-parensfor tuples created with inner tuplesCloses #4907
Fix false positive
unused-private-memberfor accessing attributes in a class usingclsCloses #4849
Fix false positive
unused-private-memberfor private staticmethods accessed in classmethods.Closes #4849
Extended
consider-using-incheck to work for attribute access.Setting
min-similarity-linesto 0 now makes the similarty checker stop checking for duplicate codeCloses #4901
Fix a bug where pylint complained if the cache's parent directory does not exist
Closes #4900
The
global-variable-not-assignedchecker now catches global variables that are never reassigned in a local scope and catches (reassigned) functionsCloses #1375 Closes #330
Fix false positives for invalid-all-format that are lists or tuples at runtime
Closes #4711
Fix
no-self-useanddocparams extensionfor async functions and methods.Add documentation for
pyreverseandsymilarCloses #4616
Non symbolic messages with the wrong capitalisation now correctly trigger
use-symbolic-message-insteadCloses #5000
The
consider-iterating-dictionarychecker now also considers membership checksCloses #4069
The
invalid-namemessage is now more detailed when using multiple naming style regexes.