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:
CenTdemeern1
2022-10-15 22:25:38 -07:00
committed by GitHub
parent c94e215c8d
commit 04698538d8
19 changed files with 40 additions and 48 deletions

View File

@ -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)

View File

@ -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])})