Enable ruff E741 rule (#11370)

* Enable ruff E741 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Maxim Smolskiy
2024-04-19 22:30:22 +03:00
committed by GitHub
parent 0a9a860eb1
commit a42eb35702
14 changed files with 102 additions and 92 deletions

View File

@@ -41,7 +41,7 @@ def calculate_pi(limit: int) -> str:
t = 1
k = 1
n = 3
l = 3
m = 3
decimal = limit
counter = 0
@@ -65,11 +65,11 @@ def calculate_pi(limit: int) -> str:
q *= 10
r = nr
else:
nr = (2 * q + r) * l
nn = (q * (7 * k) + 2 + (r * l)) // (t * l)
nr = (2 * q + r) * m
nn = (q * (7 * k) + 2 + (r * m)) // (t * m)
q *= k
t *= l
l += 2
t *= m
m += 2
k += 1
n = nn
r = nr