Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Feb 2, 2016
1 parent 0ceae70 commit a231665
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion intranet/middleware/profiler.py
Expand Up @@ -10,9 +10,9 @@
import resource
import tempfile
import time
from typing import Any
from collections import defaultdict
from io import StringIO
from typing import Any # noqa

import cProfile

Expand Down
30 changes: 15 additions & 15 deletions intranet/settings/base.py
Expand Up @@ -6,7 +6,7 @@
import subprocess
import sys
from datetime import datetime, timedelta
from typing import AbstractSet, Any
from typing import AbstractSet, Any # noqa

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -51,11 +51,11 @@
'ENGINE': 'django.db.backends.postgresql',
'CONN_MAX_AGE': 30
}
} # type: Dict[str,Dict[str,Any]]
} # type: Dict[str,Dict[str,Any]]


class MigrationMock(object):
seen = set() # type: AbstractSet[str]
seen = set() # type: AbstractSet[str]

def __contains__(self, mod):
return True
Expand Down Expand Up @@ -331,20 +331,20 @@ def get_month_seconds():
SESSION_COOKIE_AGE = int(timedelta(hours=2).total_seconds())
SESSION_SAVE_EVERY_REQUEST = True

CACHES = {"default": {"OPTIONS": {}}} # type: Dict[str,Dict[str,Any]]
CACHES = {"default": {"OPTIONS": {}}} # type: Dict[str,Dict[str,Any]]

if TESTING or os.getenv("DUMMY_CACHE", "NO") == "YES":
CACHES["default"]["BACKEND"] = "django.core.cache.backends.dummy.DummyCache"
else:
CACHES["default"] = {
"BACKEND": "redis_cache.RedisCache",
"LOCATION": "127.0.0.1:6379",
"OPTIONS": {
"PARSER_CLASS": "redis.connection.HiredisParser",
"PICKLE_VERSION": 4,
},
"KEY_PREFIX": VIRTUAL_ENV
}
"BACKEND": "redis_cache.RedisCache",
"LOCATION": "127.0.0.1:6379",
"OPTIONS": {
"PARSER_CLASS": "redis.connection.HiredisParser",
"PICKLE_VERSION": 4,
},
"KEY_PREFIX": VIRTUAL_ENV
}


# LDAP configuration
Expand Down Expand Up @@ -432,7 +432,7 @@ def get_month_seconds():
"widget_tweaks",
"corsheaders",
"cacheops"
]
]

# Eighth period default block date format
EIGHTH_BLOCK_DATE_FORMAT = "D, N j, Y"
Expand Down Expand Up @@ -565,7 +565,7 @@ def get_log(name):
DEBUG_TOOLBAR_CONFIG = {
"INTERCEPT_REDIRECTS": False,
"DISABLE_PANELS": [panel for panel, enabled in _panels if not enabled]
} # type: Dict[str,Any]
} # type: Dict[str,Any]

DEBUG_TOOLBAR_PANELS = [t[0] for t in _panels]

Expand All @@ -578,7 +578,7 @@ def get_log(name):
INSTALLED_APPS += [
"debug_toolbar",
"debug_toolbar_line_profiler",
]
]

def debug_toolbar_callback(request):
"""Show the debug toolbar to those with the Django staff permission, excluding
Expand Down

0 comments on commit a231665

Please sign in to comment.