HomePhabricator

check-code: forbid mutable value for default argument

Authored by marmoute.

Description

check-code: forbid mutable value for default argument

default value are common to all call. Using mutable value is a classical source
of bug in Python. We forbid it.

The regexp (Courtesy of Matt Mackall) is only catching such value on the first
line of a definition, but that will be good enough for now.

Details

Committed
marmouteSep 24 2015, 3:34 AM
Parents
rHGe9a35411bbbc: httpconnection: remove a mutable default argument
Branches
Unknown
Tags
Unknown