Browse files

flake8 settings

  • Loading branch information...
1 parent 181948e commit 825324c8faad86475c2f7d449cd4522a885c2980 @wraithan wraithan committed Apr 6, 2013
View
51 readthedocs/settings/base.py
@@ -138,16 +138,16 @@
#CARROT_BACKEND = "ghettoq.taproot.Database"
CELERY_ALWAYS_EAGER = True
-CELERYD_TASK_TIME_LIMIT = 60*60 #60 minutes
+CELERYD_TASK_TIME_LIMIT = 60*60 # 60 minutes
CELERY_SEND_TASK_ERROR_EMAILS = True
CELERY_ROUTES = {
- 'celery_haystack.tasks.CeleryHaystackSignalHandler': {
- 'queue': 'celery_haystack',
- },
- 'projects.tasks.fileify': {
- 'queue': 'celery_haystack',
- },
+ 'celery_haystack.tasks.CeleryHaystackSignalHandler': {
+ 'queue': 'celery_haystack',
+ },
+ 'projects.tasks.fileify': {
+ 'queue': 'celery_haystack',
+ },
}
@@ -186,39 +186,41 @@
REPO_LOCK_SECONDS = 30
ALLOW_PRIVATE_REPOS = False
+LOG_FORMAT = "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s"
+
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
- 'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
- 'datefmt' : "%d/%b/%Y %H:%M:%S"
+ 'format': LOG_FORMAT,
+ 'datefmt': "%d/%b/%Y %H:%M:%S"
},
},
'handlers': {
'null': {
- 'level':'DEBUG',
- 'class':'django.utils.log.NullHandler',
+ 'level': 'DEBUG',
+ 'class': 'django.utils.log.NullHandler',
},
'exceptionlog': {
- 'level':'DEBUG',
- 'class':'logging.handlers.RotatingFileHandler',
+ 'level': 'DEBUG',
+ 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(LOGS_ROOT, "exceptions.log"),
'maxBytes': maxBytes,
'backupCount': backup_count,
'formatter': 'standard',
},
'errorlog': {
- 'level':'DEBUG',
- 'class':'logging.handlers.RotatingFileHandler',
+ 'level': 'DEBUG',
+ 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(LOGS_ROOT, "rtd.log"),
'maxBytes': maxBytes,
'backupCount': backup_count,
'formatter': 'standard',
},
'db': {
- 'level':'DEBUG',
- 'class':'logging.handlers.RotatingFileHandler',
+ 'level': 'DEBUG',
+ 'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(LOGS_ROOT, "db.log"),
'maxBytes': maxBytes,
'backupCount': backup_count,
@@ -228,17 +230,17 @@
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
},
- 'console':{
- 'level':'DEBUG',
- 'class':'logging.StreamHandler',
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
'formatter': 'standard'
},
},
'loggers': {
'django': {
- 'handlers':['console', 'errorlog'],
+ 'handlers': ['console', 'errorlog'],
'propagate': True,
- 'level':'WARN',
+ 'level': 'WARN',
},
'django.db.backends': {
'handlers': ['db'],
@@ -250,8 +252,9 @@
'level': 'ERROR',
'propagate': False,
},
- #Default handler for everything that we're doing. Hopefully this doesn't double-print
- #the Django things as well. Not 100% sure how logging works :)
+ # Default handler for everything that we're doing. Hopefully this
+ # doesn't double-print the Django things as well. Not 100% sure how
+ # logging works :)
'': {
'handlers': ['console', 'errorlog'],
'level': 'DEBUG',
View
4 readthedocs/settings/onebox.py
@@ -1,4 +1,4 @@
-from .base import *
+from .base import * # noqa
DATABASES = {
'default': {
@@ -58,6 +58,6 @@
try:
- from local_settings import *
+ from local_settings import * # noqa
except:
pass
View
6 readthedocs/settings/postgres.py
@@ -1,4 +1,5 @@
-from .base import *
+from .base import * # noqa
+
DATABASES = {
'default': {
@@ -49,8 +50,7 @@
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTOCOL", "https")
-
try:
- from local_settings import *
+ from local_settings import * # noqa
except:
pass
View
5 readthedocs/settings/sqlite.py
@@ -1,6 +1,7 @@
-from .base import *
import os.path
+from .base import * # noqa
+
DATABASES = {
'default': {
@@ -46,6 +47,6 @@
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
try:
- from local_settings import *
+ from local_settings import * # noqa
except:
pass

0 comments on commit 825324c

Please sign in to comment.