mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
match: explicitly tests for None
Changeset ba7f2a1cc2d2 removed the mutable default value, but did not explicitly tested for None. Such implicit testing can introduce semantic and performance issue. We move to an explicit testing for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
This commit is contained in:
parent
0d3c7adc2c
commit
be968edfac
@ -117,8 +117,10 @@ class match(object):
|
||||
the same directory
|
||||
'<something>' - a pattern of the specified default type
|
||||
"""
|
||||
include = include or []
|
||||
exclude = exclude or []
|
||||
if include is None:
|
||||
include = []
|
||||
if exclude is None:
|
||||
exclude = []
|
||||
|
||||
self._root = root
|
||||
self._cwd = cwd
|
||||
|
Loading…
Reference in New Issue
Block a user