mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +08:00
Replace bandit, flake8, isort, and pyupgrade with ruff (#8178)
* Replace bandit, flake8, isort, and pyupgrade with ruff * Comment on ruff rules * updating DIRECTORY.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -20,7 +20,7 @@ Runtime: O(n * n)
|
||||
Space: O(n)
|
||||
"""
|
||||
|
||||
from functools import lru_cache
|
||||
import functools
|
||||
from typing import Any
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ def word_break(string: str, words: list[str]) -> bool:
|
||||
len_string = len(string)
|
||||
|
||||
# Dynamic programming method
|
||||
@lru_cache(maxsize=None)
|
||||
@functools.cache
|
||||
def is_breakable(index: int) -> bool:
|
||||
"""
|
||||
>>> string = 'a'
|
||||
|
Reference in New Issue
Block a user