mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
Fix ruff (#11527)
* updating DIRECTORY.md * Fix ruff * Fix * Fix * Fix * Revert "Fix" This reverts commit 5bc3bf342208dd707da02dea7173c059317b6bc6. * find_max.py: noqa: PLR1730 --------- Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -46,8 +46,7 @@ def calculate_turn_around_time(
|
||||
i = 0
|
||||
while finished_process[i] == 1:
|
||||
i += 1
|
||||
if current_time < arrival_time[i]:
|
||||
current_time = arrival_time[i]
|
||||
current_time = max(current_time, arrival_time[i])
|
||||
|
||||
response_ratio = 0
|
||||
# Index showing the location of the process being performed
|
||||
|
@ -66,8 +66,7 @@ def calculate_waitingtime(
|
||||
finar = finish_time - arrival_time[short]
|
||||
waiting_time[short] = finar - burst_time[short]
|
||||
|
||||
if waiting_time[short] < 0:
|
||||
waiting_time[short] = 0
|
||||
waiting_time[short] = max(waiting_time[short], 0)
|
||||
|
||||
# Increment time
|
||||
increment_time += 1
|
||||
|
Reference in New Issue
Block a user