__defaults__ is available in py27

This commit is contained in:
Anthony Sottile
2017-02-16 10:46:23 -08:00
parent 109c17c5df
commit e4eb2b0fc5
2 changed files with 1 additions and 7 deletions

View File

@@ -5,14 +5,12 @@ import collections
import contextlib
import os
from pre_commit import five
UNSET = collections.namedtuple('UNSET', ())()
Var = collections.namedtuple('Var', ('name', 'default'))
setattr(Var.__new__, five.defaults_attr, ('',))
setattr(Var.__new__, '__defaults__', ('',))
def format_env(parts, env):