github dosisod/refurb v1.7.0
Version 1.7.0

latest releases: v2.0.0, v1.28.0, v1.27.0...
24 months ago

This version includes a bug fix which has been causing some issues, as well as a new flag and a new check.

The "use min/max" check (FURB136)

This check will detect uses of ternary statements (inline-if expressions) which can be written with the builtin min()/max() functions instead. For example:

score1 = 90
score2 = 99

highest_score = score1 if score1 > score2 else score2

Refurb will suggest you write this as:

score1 = 90
score2 = 99

highest_score = max(score1, score2)

Mypy Flags

You can now add Mypy flags directly from the Refurb command line like so:

$ refurb files -- --pdb --show-traceback

The --pdb and --show-traceback flags will get forwarded to Mypy. This is primarily for development purposes, but can be useful to normal users as well (especially those who already use Mypy). See the docs for more info.

What's Changed

Full Changelog: v1.6.0...v1.7.0

Don't miss a new refurb release

NewReleases is sending notifications on new releases.