Skip to content

Instantly share code, notes, and snippets.

View adamchainz's full-sized avatar
🍐
I like pears.

Adam Johnson adamchainz

🍐
I like pears.
View GitHub Profile
@adamchainz
adamchainz / typed_property.py
Created October 18, 2021 10:30 — forked from willmcgugan/typed_property.py
A descriptor that permits a different type in the setter
from __future__ import annotations
from typing import NamedTuple, cast, overload
class ConsoleDimensions(NamedTuple):
width: int
height: int