From 928e68192c4bf1eecc2439b8c81f6f72c4f900dd Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sat, 13 Oct 2007 15:59:54 +0000 Subject: [PATCH] Some Django coding style fixes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6478 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management/color.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/django/core/management/color.py b/django/core/management/color.py index ce95401491..40fd4e7fdd 100644 --- a/django/core/management/color.py +++ b/django/core/management/color.py @@ -2,12 +2,14 @@ Sets up the terminal color scheme. """ -from django.utils import termcolors import sys +from django.utils import termcolors + def color_style(): - "Returns a Style object with the Django color scheme." - if sys.platform == 'win32' or sys.platform == 'Pocket PC' or sys.platform.startswith('java') or not sys.stdout.isatty(): + """Returns a Style object with the Django color scheme.""" + if (sys.platform == 'win32' or sys.platform == 'Pocket PC' + or sys.platform.startswith('java') or not sys.stdout.isatty()): return no_style() class dummy: pass style = dummy() @@ -21,7 +23,7 @@ def color_style(): return style def no_style(): - "Returns a Style object that has no colors." + """Returns a Style object that has no colors.""" class dummy: def __getattr__(self, attr): return lambda x: x