1
0
mirror of https://github.com/django/django.git synced 2025-10-27 15:46:10 +00:00

[1.7.x] Fixed flake8 warnings introduced in recent commits.

Backport of 79f05616fb from master
This commit is contained in:
Simon Charette
2014-04-16 16:49:37 -04:00
committed by Tim Graham
parent 9e86c3f0a6
commit 33d1dc2eeb
4 changed files with 3 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ Doctest example from the official Python documentation.
https://docs.python.org/3/library/doctest.html
"""
def factorial(n):
"""Return the factorial of n, an exact integer >= 0.
@@ -35,7 +36,7 @@ def factorial(n):
raise ValueError("n must be >= 0")
if math.floor(n) != n:
raise ValueError("n must be exact integer")
if n+1 == n: # catch a value like 1e300
if n + 1 == n: # catch a value like 1e300
raise OverflowError("n too large")
result = 1
factor = 2