Fix pylint and flake8 warnings.

* Mark TabError as noqa to silence linters on Python 3
* Disable mixed_indentation warning for pylint
This commit is contained in:
Satwik Kansal 2017-09-04 10:22:03 -07:00 committed by GitHub
commit ad6898e6f4
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
def square(x):
sum_so_far = 0
for counter in range(x):
sum_so_far = sum_so_far + x
return sum_so_far
for _ in range(x):
sum_so_far += x
return sum_so_far # noqa: E999 # pylint: disable=mixed-indentation Python 3 will raise a TabError here
print(square(10))