🧠 Latest TIL: Never Call `spark.stop()` in Databricks Workflows Aug 27
🧠 TIL

Mypy Narrowing of Union[T, None]

Mypy only narrows Union[T, None] when it sees an explicit check for None or an assertion. This behaviour leads to type errors that may seem unintuitive to solve.

August 1, 2025 Â· 2 min Â· 270 words Â· Dan Wertheimer