The black formatter is no longer beta (#5960)

* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2022-01-30 20:29:54 +01:00
committed by GitHub
parent c15a4d5af6
commit 24d3cf8244
81 changed files with 139 additions and 228 deletions

View File

@ -32,7 +32,7 @@ def bisection(function: Callable[[float], float], a: float, b: float) -> float:
raise ValueError("could not find root in given interval.")
else:
mid: float = start + (end - start) / 2.0
while abs(start - mid) > 10 ** -7: # until precisely equals to 10^-7
while abs(start - mid) > 10**-7: # until precisely equals to 10^-7
if function(mid) == 0:
return mid
elif function(mid) * function(start) < 0:
@ -44,7 +44,7 @@ def bisection(function: Callable[[float], float], a: float, b: float) -> float:
def f(x: float) -> float:
return x ** 3 - 2 * x - 5
return x**3 - 2 * x - 5
if __name__ == "__main__":