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:
@@ -22,7 +22,7 @@ Minimum Cost For Tickets
|
||||
Dynamic Programming: up -> down.
|
||||
"""
|
||||
|
||||
from functools import lru_cache
|
||||
import functools
|
||||
|
||||
|
||||
def mincost_tickets(days: list[int], costs: list[int]) -> int:
|
||||
@@ -106,7 +106,7 @@ def mincost_tickets(days: list[int], costs: list[int]) -> int:
|
||||
|
||||
days_set = set(days)
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
@functools.cache
|
||||
def dynamic_programming(index: int) -> int:
|
||||
if index > 365:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user