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:
Maxim Smolskiy
2024-03-20 17:00:17 +03:00
committed by GitHub
parent 8faf823e83
commit a936e94704
11 changed files with 22 additions and 31 deletions

View File

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

View File

@ -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]
"""