From 6d9b4f443c4a82fd5a5662e43ccdc3f1ffcbb7ed Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 22 Jan 2006 05:53:36 +0000 Subject: [PATCH] magic-removal: Negligible changes to ManipulatorDescriptor git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2101 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/manipulators.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/django/db/models/manipulators.py b/django/db/models/manipulators.py index d116763b08..65ba917f6d 100644 --- a/django/db/models/manipulators.py +++ b/django/db/models/manipulators.py @@ -17,23 +17,23 @@ dispatcher.connect(add_manipulators, signal=signals.class_prepared) class ManipulatorDescriptor(object): def __init__(self, name, base): - self.man = None + self.man = None # Cache of the manipulator class. self.name = name self.base = base - def __get__(self, instance, type=None): + def __get__(self, instance, type_=None): if instance != None: - raise "Manipulator can not be accessed via instance" + raise "Manipulator cannot be accessed via instance" else: if not self.man: # Create a class that inherits from the "Manipulator" class # given in the model class (if specified) and the automatic # manipulator. bases = [self.base] - if hasattr(type, 'Manipulator'): - bases = [type.Manipulator] + bases + if hasattr(type_, 'Manipulator'): + bases = [type_.Manipulator] + bases self.man = types.ClassType(self.name, tuple(bases), {}) - self.man._prepare(type) + self.man._prepare(type_) return self.man class Naming(object):