From e90cecf3fceb40f044af0a64970579f048965f5a Mon Sep 17 00:00:00 2001 From: alexafshar Date: Fri, 18 Nov 2022 16:11:18 +0000 Subject: [PATCH] :art: Format Python code with psf/black --- backend/api/appd/AppDService.py | 5 ++--- backend/util/excel_utils.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/api/appd/AppDService.py b/backend/api/appd/AppDService.py index 53ecdc5..f9c4b5d 100644 --- a/backend/api/appd/AppDService.py +++ b/backend/api/appd/AppDService.py @@ -988,9 +988,8 @@ async def getSyntheticSessionData(self, applicationId: int, jobsJson: List[dict] # get the last 24 hours in milliseconds lastMonth = self.endTime - (1 * 60 * 60 * 24 * 30 * 1000) monthStart = datetime.timestamp(datetime.today().replace(day=1, hour=0, minute=0, second=0, microsecond=0)) - ws = (date.today() - timedelta(date.today().weekday())) - weekStart = datetime.timestamp( - datetime.today().replace(year=ws.year, month=ws.month, day=ws.day, hour=0, minute=0, second=0, microsecond=0)) + ws = date.today() - timedelta(date.today().weekday()) + weekStart = datetime.timestamp(datetime.today().replace(year=ws.year, month=ws.month, day=ws.day, hour=0, minute=0, second=0, microsecond=0)) body = { "appId": applicationId, "scheduleIds": jobsJson, diff --git a/backend/util/excel_utils.py b/backend/util/excel_utils.py index 864ed11..362d7ad 100644 --- a/backend/util/excel_utils.py +++ b/backend/util/excel_utils.py @@ -46,7 +46,7 @@ def writeUncoloredRow(sheet: Worksheet, rowIdx: int, data: [Any]): sheet[f"{colIdx}{rowIdx}"] = cell except IllegalCharacterError: logging.warning(f"illegal character detected in cell, will scrub {cell}") - cell = ILLEGAL_CHARACTERS_RE.sub(r'', cell) + cell = ILLEGAL_CHARACTERS_RE.sub(r"", cell) logging.warning(f"scrubbed cell: {cell}") sheet[f"{colIdx}{rowIdx}"] = cell