Fix some annotation errors

Change-Id: Ib3f08c079b29c9ad0e3c41697da6744b9c17e1e6
This commit is contained in:
yuhui_inspur 2017-02-08 19:24:38 -08:00 committed by yuhui
parent f0dda9ac0d
commit f8bc0d65cd
4 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@ Could I hook an external service into a panel using, for example, an iFrame?
Panels are just entry-points to hook views into the larger dashboard Panels are just entry-points to hook views into the larger dashboard
navigational structure and enforce common attributes like RBAC. The navigational structure and enforce common attributes like RBAC. The
view and corresponding templates can contain anything you would like, views and corresponding templates can contain anything you would like,
including iFrames. including iFrames.
What does this mean for visual design? What does this mean for visual design?

View File

@ -54,7 +54,7 @@ If you need to install PhantomJS, you may do so with `npm` like this::
$ npm -g install phantomjs $ npm -g install phantomjs
Alternatively, many distributions have system packages for phantomjs, or Alternatively, many distributions have system packages for PhantomJS, or
it can be downloaded from http://phantomjs.org/download.html. it can be downloaded from http://phantomjs.org/download.html.
tox Test Environments tox Test Environments

View File

@ -35,7 +35,7 @@ class HandleTests(test.TestCase):
exceptions.handle(req) exceptions.handle(req)
# The real test here is to make sure the handle method doesn't throw a # The real test here is to make sure the handle method doesn't throw a
# UnicodeEncodeError, but making sure the message is correct could be # UnicodeEncodeError, but making sure the message is correct and
# useful as well. # useful as well.
self.assertItemsEqual(req.horizon['async_messages'], [expected]) self.assertItemsEqual(req.horizon['async_messages'], [expected])
@ -57,6 +57,6 @@ class HandleTests(test.TestCase):
# message part of the first message. There should be only one message # message part of the first message. There should be only one message
# in this test case. # in this test case.
self.assertIn(message, req.horizon['async_messages'][0][1]) self.assertIn(message, req.horizon['async_messages'][0][1])
# verifying that the exec message which in this case is not trusted # verifies that the exec message which in this case is not trusted
# is not in the message content # is not in the message content.
self.assertNotIn(exc_msg, req.horizon['async_messages'][0][1]) self.assertNotIn(exc_msg, req.horizon['async_messages'][0][1])

View File

@ -108,8 +108,8 @@ def get_log_length(request):
def get_timezone(request): def get_timezone(request):
# Session and cookie store timezone as django_timezone. # Session and cookie store timezone as django_timezone.
# In case there is no timezone neither in session nor cookie # In case there is no timezone neither in session nor in cookie,
# use default value from settings file where it's called TIME_ZONE # use default value from settings file where it's called TIME_ZONE.
return get_config_value(request, 'django_timezone', return get_config_value(request, 'django_timezone',
getattr(settings, 'TIME_ZONE', 'UTC')) getattr(settings, 'TIME_ZONE', 'UTC'))
@ -133,7 +133,7 @@ def get_keys(tuple_of_tuples):
def value_for_key(tuple_of_tuples, key): def value_for_key(tuple_of_tuples, key):
"""Processes a tuple of 2-element tuples and returns the value """Processes a tuple of 2-element tuples and returns the value
corresponding to the given key. If not value is found, the key is returned. corresponding to the given key. If no value is found, the key is returned.
""" """
for t in tuple_of_tuples: for t in tuple_of_tuples:
if t[0] == key: if t[0] == key: