mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-12 23:52:17 +08:00
Add flake8-builtins to pre-commit and fix errors (#7105)
Ignore `A003` Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
This commit is contained in:
@ -56,8 +56,8 @@ def dijkstra(graph, start, end):
|
||||
for v, c in graph[u]:
|
||||
if v in visited:
|
||||
continue
|
||||
next = cost + c
|
||||
heapq.heappush(heap, (next, v))
|
||||
next_item = cost + c
|
||||
heapq.heappush(heap, (next_item, v))
|
||||
return -1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user