Derived from the refurb linter.
This rule is unstable and in preview. The
--preview flag is required for use.
What it does#
Checks for uses of
read that can be replaced by
Why is this bad?#
When reading the entire contents of a file into a variable, it's simpler
and more concise to use
pathlib methods like
Path.read_bytes instead of
read calls via