Mercurial > hg
diff hgext/censor.py @ 26348:b80b2ee71a08
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 24 Sep 2015 00:34:15 -0700 |
parents | 5e18f6e39006 |
children | 56b2bcea2529 |