mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-10 22:44:16 +08:00
Enable ruff ARG001 rule (#11321)
* Enable ruff ARG001 rule * Fix dynamic_programming/combination_sum_iv.py * Fix machine_learning/frequent_pattern_growth.py * Fix other/davis_putnam_logemann_loveland.py * Fix other/password.py * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix physics/n_body_simulation.py * Fix project_euler/problem_145/sol1.py * Fix project_euler/problem_174/sol1.py * Fix scheduling/highest_response_ratio_next.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * Fix * Fix scheduling/job_sequencing_with_deadline.py * Fix scheduling/job_sequencing_with_deadline.py * Fix * Fix --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -75,7 +75,10 @@ def calculate_turn_around_time(
|
||||
|
||||
|
||||
def calculate_waiting_time(
|
||||
process_name: list, turn_around_time: list, burst_time: list, no_of_process: int
|
||||
process_name: list, # noqa: ARG001
|
||||
turn_around_time: list,
|
||||
burst_time: list,
|
||||
no_of_process: int,
|
||||
) -> list:
|
||||
"""
|
||||
Calculate the waiting time of each processes.
|
||||
|
@ -1,9 +1,8 @@
|
||||
def job_sequencing_with_deadlines(num_jobs: int, jobs: list) -> list:
|
||||
def job_sequencing_with_deadlines(jobs: list) -> list:
|
||||
"""
|
||||
Function to find the maximum profit by doing jobs in a given time frame
|
||||
|
||||
Args:
|
||||
num_jobs [int]: Number of jobs
|
||||
jobs [list]: A list of tuples of (job_id, deadline, profit)
|
||||
|
||||
Returns:
|
||||
@ -11,10 +10,10 @@ def job_sequencing_with_deadlines(num_jobs: int, jobs: list) -> list:
|
||||
in a given time frame
|
||||
|
||||
Examples:
|
||||
>>> job_sequencing_with_deadlines(4,
|
||||
>>> job_sequencing_with_deadlines(
|
||||
... [(1, 4, 20), (2, 1, 10), (3, 1, 40), (4, 1, 30)])
|
||||
[2, 60]
|
||||
>>> job_sequencing_with_deadlines(5,
|
||||
>>> job_sequencing_with_deadlines(
|
||||
... [(1, 2, 100), (2, 1, 19), (3, 2, 27), (4, 1, 25), (5, 1, 15)])
|
||||
[2, 127]
|
||||
"""
|
||||
|
Reference in New Issue
Block a user