From fdd571ac9ca9102962889b2ef825b178ee33cdbf Mon Sep 17 00:00:00 2001 From: Yun Zheng Hu Date: Tue, 5 Sep 2023 10:15:49 +0000 Subject: [PATCH] Fix black linting --- flow/record/fieldtypes/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flow/record/fieldtypes/__init__.py b/flow/record/fieldtypes/__init__.py index 26f41c0..db7825f 100644 --- a/flow/record/fieldtypes/__init__.py +++ b/flow/record/fieldtypes/__init__.py @@ -298,8 +298,8 @@ def __new__(cls, *args, **kwargs): tstr = arg tzstr = "" if tzpos := arg[10:].find("+") + 1 or arg[10:].find("-") + 1: - tzstr = arg[10 + tzpos-1 :] - tstr = arg[:10 + tzpos-1] + tzstr = arg[10 + tzpos - 1 :] + tstr = arg[: 10 + tzpos - 1] # Convert +0200 to +02:00 so that fromisoformat() works correctly on Python 3.10 and older if len(tzstr) == 5 and tzstr[3] != ":": @@ -308,7 +308,7 @@ def __new__(cls, *args, **kwargs): # Python 3.10 and older do not support nanoseconds in fromisoformat() if microsecond_pos := arg.rfind(".") + 1: microseconds = arg[microsecond_pos:] - tstr = arg[:microsecond_pos - 1] + tstr = arg[: microsecond_pos - 1] if tzpos := (microseconds.find("+") + 1 or microseconds.find("-") + 1): microseconds = microseconds[: tzpos - 1] # Pad microseconds to 6 digits, truncate if longer