From 80718bd8802e9afd19c986b4cae18beb38d8058c Mon Sep 17 00:00:00 2001 From: onlinejudge95 <44158581+onlinejudge95@users.noreply.github.com> Date: Mon, 10 Feb 2020 16:13:57 +0530 Subject: [PATCH] Fixes black failures (#1742) --- maths/montecarlo.py | 2 +- scheduling/first_come_first_served.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/maths/montecarlo.py b/maths/montecarlo.py index 903012429..ce8f69f64 100644 --- a/maths/montecarlo.py +++ b/maths/montecarlo.py @@ -4,6 +4,7 @@ from numpy import pi, sqrt from random import uniform + def pi_estimator(iterations: int): """An implementation of the Monte Carlo method used to find pi. 1. Draw a 2x2 square centred at (0,0). @@ -15,7 +16,6 @@ def pi_estimator(iterations: int): 6. Print the estimated and numpy value of pi """ - circle_dots = 0 # A local function to see if a dot lands in the circle. diff --git a/scheduling/first_come_first_served.py b/scheduling/first_come_first_served.py index d339273fe..f52c4243d 100644 --- a/scheduling/first_come_first_served.py +++ b/scheduling/first_come_first_served.py @@ -38,7 +38,10 @@ def calculate_turnaround_times( >>> calculate_turnaround_times([10, 3], [0, 10]) [10, 13] """ - return [duration_time + waiting_times[i] for i, duration_time in enumerate(duration_times)] + return [ + duration_time + waiting_times[i] + for i, duration_time in enumerate(duration_times) + ] def calculate_average_turnaround_time(turnaround_times: List[int]) -> float: