Skip to content

Instantly share code, notes, and snippets.

@dogweather
Created October 4, 2022 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogweather/dc6a10037de37c92f463cae139edcb52 to your computer and use it in GitHub Desktop.
Save dogweather/dc6a10037de37c92f463cae139edcb52 to your computer and use it in GitHub Desktop.
#
# Original
#
error: Argument 1 to "assert_never" has incompatible type "Literal[Color.BLUE]";
expected "NoReturn"
#
# Refactored
#
error: Cases within match statement do not exhaustively handle all values
  Unhandled type: "Literal[Color.BLUE]"
  If exhaustive handling is not intended, add "case _: pass"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment