diff --git a/avatar/utils.py b/avatar/utils.py index 6660fc8..f09b648 100644 --- a/avatar/utils.py +++ b/avatar/utils.py @@ -13,7 +13,7 @@ cached_funcs = set() def get_username(user): - """ Return username of a User instance """ + """Return username of a User instance""" if hasattr(user, "get_username"): return user.get_username() else: @@ -21,7 +21,7 @@ def get_username(user): def get_user(username): - """ Return user from a username/ish identifier """ + """Return user from a username/ish identifier""" return get_user_model().objects.get_by_natural_key(username) diff --git a/docs/conf.py b/docs/conf.py index cf9fde9..35af91b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,8 +40,8 @@ source_suffix = ".txt" master_doc = "index" # General information about the project. -project = u"django-avatar" -copyright = u"2013, django-avatar developers" +project = "django-avatar" +copyright = "2013, django-avatar developers" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -187,8 +187,8 @@ latex_documents = [ ( "index", "django-avatar.tex", - u"django-avatar Documentation", - u"django-avatar developers", + "django-avatar Documentation", + "django-avatar developers", "manual", ), ] @@ -222,8 +222,8 @@ man_pages = [ ( "index", "django-avatar", - u"django-avatar Documentation", - [u"django-avatar developers"], + "django-avatar Documentation", + ["django-avatar developers"], 1, ) ] @@ -241,8 +241,8 @@ texinfo_documents = [ ( "index", "django-avatar", - u"django-avatar Documentation", - u"django-avatar developers", + "django-avatar Documentation", + "django-avatar developers", "django-avatar", "One line description of project.", "Miscellaneous", diff --git a/tests/tests.py b/tests/tests.py index d9c592f..d7bdf5b 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -53,7 +53,7 @@ def root_mean_square_difference(image1, image2): "Calculate the root-mean-square difference between two images" diff = ImageChops.difference(image1, image2).convert("L") h = diff.histogram() - sq = (value * (idx ** 2) for idx, value in enumerate(h)) + sq = (value * (idx**2) for idx, value in enumerate(h)) sum_of_squares = sum(sq) rms = math.sqrt(sum_of_squares / float(image1.size[0] * image1.size[1])) return rms