Skip to content

Commit

Permalink
Drop unnecessary typing.cast()
Browse files Browse the repository at this point in the history
  • Loading branch information
wbolster committed Oct 18, 2021
1 parent 20fd81c commit 6231269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsonlines/jsonlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def read(
line = line[1:]

try:
value = self._loads(line)
value: JSONValue = self._loads(line)
except ValueError as orig_exc:
exc = InvalidLineError(
f"line contains invalid json: {orig_exc}", line, lineno
Expand All @@ -318,7 +318,7 @@ def read(
"line does not match requested type", line, lineno
)

return cast(JSONValue, value)
return value

# No type specified, None not allowed
@overload
Expand Down

0 comments on commit 6231269

Please sign in to comment.