From 8e1d5ed08f430341e39cadfdd01223bfff77baae Mon Sep 17 00:00:00 2001 From: Stephane Odul Date: Thu, 8 Nov 2012 09:57:55 -0800 Subject: [PATCH] Fix type error exception when reporting on W6002 and W6007 I'm not sure why %d is not working but switching to %s made the tool report numbers properly without breaking. --- DjangoLint/AstCheckers/model_fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DjangoLint/AstCheckers/model_fields.py b/DjangoLint/AstCheckers/model_fields.py index 915d1aa..4394fa0 100644 --- a/DjangoLint/AstCheckers/model_fields.py +++ b/DjangoLint/AstCheckers/model_fields.py @@ -34,14 +34,14 @@ class ModelFieldsChecker(BaseChecker): "%s: Naive tree structure implementation using ForeignKey('self')", ''), 'W6002': ( - 'Model has too many fields (%d/%d); consider splitting model', + 'Model has too many fields (%s/%s); consider splitting model', ''), 'W6003': ('Model has no fields', ''), 'W6004': ('%s: Field is nullable but blank=False', ''), 'W6005': ('%s: uses brittle unique_for_%s', ''), 'W6006': ('%s: ForeignKey missing related_name', ''), 'W6007': ( - '%s: CharField with huge (%d/%d) max_length instead of TextField', + '%s: CharField with huge (%s/%s) max_length instead of TextField', ''), 'W6008': ('%s: Uses superceded auto_now or auto_now_add', ''), 'W6009': (