Skip to content

Commit

Permalink
typing: fix for Mypy 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Nov 13, 2023
1 parent 3f8805c commit 8d3eeb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/structlog/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _process_event(
if isinstance(event_dict, tuple):
# In this case we assume that the last processor returned a tuple
# of ``(args, kwargs)`` and pass it right through.
return event_dict # type: ignore[return-value]
return event_dict

if isinstance(event_dict, dict):
return (), event_dict
Expand Down
2 changes: 1 addition & 1 deletion src/structlog/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def _figure_out_exc_info(v: Any) -> ExcInfo:
return (v.__class__, v, v.__traceback__)

if isinstance(v, tuple):
return v # type: ignore[return-value]
return v

if v:
return sys.exc_info() # type: ignore[return-value]
Expand Down

0 comments on commit 8d3eeb1

Please sign in to comment.