Skip to content

Commit

Permalink
Fix black linting
Browse files Browse the repository at this point in the history
  • Loading branch information
yunzheng committed Sep 5, 2023
1 parent b6fc919 commit 383f5a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flow/record/fieldtypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,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] != ":":
Expand All @@ -296,7 +296,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
Expand Down

0 comments on commit 383f5a2

Please sign in to comment.