Skip to content

Commit 7f46a5b

Browse files
fatihhcelikpicnixz
andauthored
Apply suggestions from code review
Remove unnecessary tz_bytes variable. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent d6f950f commit 7f46a5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Lib/zoneinfo/_common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,10 @@ def get_abbr(idx):
118118
c = fobj.read(1) # Should be \n
119119
assert c == b"\n", c
120120

121-
tz_bytes = b""
122121
line = fobj.readline()
123122
if not line.endswith(b"\n"):
124123
raise ValueError("Invalid TZif file: unexpected end of file")
125-
tz_bytes = line.rstrip(b"\n")
126-
127-
tz_str = tz_bytes
124+
tz_str = line.rstrip(b"\n")
128125
else:
129126
tz_str = None
130127

0 commit comments

Comments
 (0)