mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
Misc fixes across multiple algorithms (#6912)
Source: Snyk code quality Add scikit-fuzzy to requirements 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:
@ -79,7 +79,7 @@ if __name__ == "__main__":
|
||||
# ensure that we actually have processes
|
||||
if len(processes) == 0:
|
||||
print("Zero amount of processes")
|
||||
exit()
|
||||
raise SystemExit(0)
|
||||
|
||||
# duration time of all processes
|
||||
duration_times = [19, 8, 9]
|
||||
@ -87,7 +87,7 @@ if __name__ == "__main__":
|
||||
# ensure we can match each id to a duration time
|
||||
if len(duration_times) != len(processes):
|
||||
print("Unable to match all id's with their duration time")
|
||||
exit()
|
||||
raise SystemExit(0)
|
||||
|
||||
# get the waiting times and the turnaround times
|
||||
waiting_times = calculate_waiting_times(duration_times)
|
||||
|
@ -276,7 +276,7 @@ if __name__ == "__main__":
|
||||
queue = deque([P1, P2, P3, P4])
|
||||
|
||||
if len(time_slices) != number_of_queues - 1:
|
||||
exit()
|
||||
raise SystemExit(0)
|
||||
|
||||
doctest.testmod(extraglobs={"queue": deque([P1, P2, P3, P4])})
|
||||
|
||||
|
Reference in New Issue
Block a user