codespell --quiet-level=2 (#1711)

* codespell --quiet-level=2

Suppress the BINARY FILE warnings

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2020-01-23 17:21:51 +01:00
committed by John Law
parent 2cf7e8f994
commit 46ac50a28e
5 changed files with 37 additions and 26 deletions

View File

@ -1,10 +1,13 @@
from typing import Callable, Union
import math as m
def line_length(fnc: Callable[[Union[int, float]], Union[int, float]],
x_start: Union[int, float],
x_end: Union[int, float],
steps: int = 100) -> float:
def line_length(
fnc: Callable[[Union[int, float]], Union[int, float]],
x_start: Union[int, float],
x_end: Union[int, float],
steps: int = 100,
) -> float:
"""
Approximates the arc length of a line segment by treating the curve as a
@ -48,10 +51,11 @@ def line_length(fnc: Callable[[Union[int, float]], Union[int, float]],
return length
if __name__ == "__main__":
def f(x):
return m.sin(10*x)
return m.sin(10 * x)
print("f(x) = sin(10 * x)")
print("The length of the curve from x = -10 to x = 10 is:")