From a4cdcf8d5dc69d1c48d2b49542c0b43751b99f38 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Wed, 15 Jul 2020 13:34:42 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- DrivingCycle.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DrivingCycle.py b/DrivingCycle.py index 6bcabfd..f70dbcd 100644 --- a/DrivingCycle.py +++ b/DrivingCycle.py @@ -59,9 +59,10 @@ def rescaleTV(self, constant): def rescaleVA(self,constant): '''return scaled VA data, also does not change in place''' - newVAdata = {} - for velocity in self.VAdata: - newVAdata[velocity*constant] = self.VAdata[velocity]*constant + newVAdata = { + velocity * constant: self.VAdata[velocity] * constant + for velocity in self.VAdata + } def plotTV(self): '''Should render a TV plot as a line graph over time, might allow