mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
Enable ruff RUF100 rule (#11337)
This commit is contained in:
@ -38,7 +38,7 @@ def longest_common_subsequence(x: str, y: str):
|
||||
n = len(y)
|
||||
|
||||
# declaring the array for storing the dp values
|
||||
l = [[0] * (n + 1) for _ in range(m + 1)] # noqa: E741
|
||||
l = [[0] * (n + 1) for _ in range(m + 1)]
|
||||
|
||||
for i in range(1, m + 1):
|
||||
for j in range(1, n + 1):
|
||||
|
@ -7,13 +7,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def ceil_index(v, l, r, key): # noqa: E741
|
||||
def ceil_index(v, l, r, key):
|
||||
while r - l > 1:
|
||||
m = (l + r) // 2
|
||||
if v[m] >= key:
|
||||
r = m
|
||||
else:
|
||||
l = m # noqa: E741
|
||||
l = m
|
||||
return r
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user