Travis CI: Add a flake8 test for unused imports (#1038)

This commit is contained in:
Christian Clauss
2019-07-25 09:49:00 +02:00
committed by Anshul
parent 46bcee0978
commit 3c8e9314b6
5 changed files with 212 additions and 221 deletions

View File

@ -6,8 +6,6 @@ Wikipedia reference: https://en.wikipedia.org/wiki/Volume
from math import pi
PI = pi
def vol_cube(side_length):
"""Calculate the Volume of a Cube."""
@ -39,9 +37,7 @@ def vol_right_circ_cone(radius, height):
volume = (1/3) * pi * radius^2 * height
"""
import math
return (float(1) / 3) * PI * (radius ** 2) * height
return (float(1) / 3) * pi * (radius ** 2) * height
def vol_prism(area_of_base, height):
@ -71,7 +67,7 @@ def vol_sphere(radius):
V = (4/3) * pi * r^3
Wikipedia reference: https://en.wikipedia.org/wiki/Sphere
"""
return (float(4) / 3) * PI * radius ** 3
return (float(4) / 3) * pi * radius ** 3
def vol_circular_cylinder(radius, height):
@ -80,7 +76,7 @@ def vol_circular_cylinder(radius, height):
Wikipedia reference: https://en.wikipedia.org/wiki/Cylinder
volume = pi * radius^2 * height
"""
return PI * radius ** 2 * height
return pi * radius ** 2 * height
def main():