This new release contains some bug fixes, documentation improvements, pre-commit support, and 2 new checks!
The "readlines()" check
This code
with open("file.txt") as f:
for line in f.readlines():
pass
Is suggested to be changed to:
with open("file.txt") as f:
for line in f:
pass
The "in keys" check
This code
d = {"key": "value"}
if "key" in d.keys():
pass
Is suggested to be changed to:
d = {"key": "value"}
if "key" in d:
pass
What's Changed
- Add pre commit config by @EFord36 in #19
- Fixed typos by @trag1c in #16
- Add
readlines()
check by @dosisod in #22 - Fix tuple unpacking false positive by @dosisod in #24
- Lots of small bug fixes by @dosisod in #25
- Add "in keys" check by @dosisod in #26
New Contributors
Full Changelog: v1.1.0...v1.2.0