github dosisod/refurb v1.2.0
Version 1.2.0

latest releases: v2.0.0, v1.28.0, v1.27.0...
2 years ago

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

New Contributors

Full Changelog: v1.1.0...v1.2.0

Don't miss a new refurb release

NewReleases is sending notifications on new releases.