Skip to content
This repository was archived by the owner on Nov 11, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
Stephane Odul committed Nov 8, 2012
commit 8e1d5ed08f430341e39cadfdd01223bfff77baae
4 changes: 2 additions & 2 deletions DjangoLint/AstCheckers/model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': (
Expand Down