Lines Matching refs:attrs
63 def __new__(mcs, name, bases, attrs): argument
68 for key, value in attrs.iteritems():
513 attrs = ', '.join(key + ': ' + repr(value)
515 return '{' + attrs + '}'
820 modules = [(ident, attrs.eval(env)) for ident, attrs in modules]
911 for i, (ident, attrs) in enumerate(modules):
912 name = attrs.get('name')
914 named_modules[name] = [ident, attrs, i]
920 modules = [(ident, attrs, i) for i, (ident, attrs) in enumerate(modules)]
924 for ident, attrs, module_id in modules:
925 defaults = attrs.get('defaults')
948 def evaluate_default(attrs, default_attrs): argument
951 if key not in attrs:
952 attrs[key] = value
954 attrs_value = attrs[key]
956 attrs[key] = evaluate_default(attrs_value, value)
957 return attrs
963 for ident, attrs, i in _po_sorted_modules(modules, named_modules):
964 for default in attrs.get('defaults', []):
965 attrs = evaluate_default(attrs, named_modules[default][1])
966 modules[i] = (ident, attrs)
977 for ident, attrs in modules:
979 namespaces.add(os.path.dirname(attrs['_path']))
991 for ident, attrs in modules:
992 match = path_matcher.match(attrs['_path'])
993 attrs['_namespace'] = namespaces[match.lastindex - 1]