mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Upgrade to flake8 v6 (#8007)
* Upgrade to flake8 v6 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -106,7 +106,7 @@ class SegmentTree(Generic[T]):
|
||||
l, r = l + self.N, r + self.N
|
||||
|
||||
res: T | None = None
|
||||
while l <= r: # noqa: E741
|
||||
while l <= r:
|
||||
if l % 2 == 1:
|
||||
res = self.st[l] if res is None else self.fn(res, self.st[l])
|
||||
if r % 2 == 0:
|
||||
|
@ -16,7 +16,7 @@ class SegmentTree:
|
||||
return idx * 2 + 1
|
||||
|
||||
def build(self, idx, l, r): # noqa: E741
|
||||
if l == r: # noqa: E741
|
||||
if l == r:
|
||||
self.st[idx] = A[l]
|
||||
else:
|
||||
mid = (l + r) // 2
|
||||
@ -33,7 +33,7 @@ class SegmentTree:
|
||||
"""
|
||||
if r < a or l > b:
|
||||
return True
|
||||
if l == r: # noqa: E741
|
||||
if l == r:
|
||||
self.st[idx] = val
|
||||
return True
|
||||
mid = (l + r) // 2
|
||||
@ -51,7 +51,7 @@ class SegmentTree:
|
||||
"""
|
||||
if r < a or l > b:
|
||||
return -math.inf
|
||||
if l >= a and r <= b: # noqa: E741
|
||||
if l >= a and r <= b:
|
||||
return self.st[idx]
|
||||
mid = (l + r) // 2
|
||||
q1 = self.query_recursive(self.left(idx), l, mid, a, b)
|
||||
|
Reference in New Issue
Block a user