Pyupgrade to Python 3.9 (#4718)

* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2021-09-07 13:37:03 +02:00
committed by GitHub
parent 5d5831bdd0
commit cecf43d648
142 changed files with 523 additions and 530 deletions

View File

@ -3,14 +3,14 @@ Shortest job remaining first
Please note arrival time and burst
Please use spaces to separate times entered.
"""
from typing import List
from __future__ import annotations
import pandas as pd
def calculate_waitingtime(
arrival_time: List[int], burst_time: List[int], no_of_processes: int
) -> List[int]:
arrival_time: list[int], burst_time: list[int], no_of_processes: int
) -> list[int]:
"""
Calculate the waiting time of each processes
Return: List of waiting times.
@ -72,8 +72,8 @@ def calculate_waitingtime(
def calculate_turnaroundtime(
burst_time: List[int], no_of_processes: int, waiting_time: List[int]
) -> List[int]:
burst_time: list[int], no_of_processes: int, waiting_time: list[int]
) -> list[int]:
"""
Calculate the turn around time of each Processes
Return: list of turn around times.
@ -91,7 +91,7 @@ def calculate_turnaroundtime(
def calculate_average_times(
waiting_time: List[int], turn_around_time: List[int], no_of_processes: int
waiting_time: list[int], turn_around_time: list[int], no_of_processes: int
) -> None:
"""
This function calculates the average of the waiting & turnaround times