Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created February 6, 2025 08:33
Show Gist options
  • Save mypy-play/0503db68188fa6965fc32ecb408fbc88 to your computer and use it in GitHub Desktop.
Save mypy-play/0503db68188fa6965fc32ecb408fbc88 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from typing import Optional
def func(x:int)->None:
pass
async def main()-> None:
geohub_pageid: Optional[int] = None
async def x()-> int:
geohub_pageid = 123
return geohub_pageid
if geohub_pageid:
func() #hover to see 'Type analysis indicates code is unreachable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment