Alex Waygood
banner
alexwaygood.bsky.social
Alex Waygood
@alexwaygood.bsky.social
Software dev at Astral 🦀. Sometimes do freelance journalism: Guardian, Telegraph, openDemocracy. Python core dev in my spare time 🐍. Studied 🎶 a while back.
(It's a top priority for us to improve our Ruff default ruleset so that fewer people opt into `ALL`; that'll hopefully unblock us a bit from adding very opinionated rule)
November 11, 2025 at 2:27 PM
It could even be added as a Ruff rule now honestly (it doesn't require type inference to tell you off about using a class-level instance-attribute annotation!), but we're a bit reluctant to add highly opinionated Ruff rules right now due to the number of people who select `ALL`
November 11, 2025 at 2:26 PM
Yeah, I think we'd definitely consider adding that kind of thing as a disabled-by-default rule. It would be low-priority for us right now, because we're scrambling to meet a beta deadline and we still haven't finished implementing the typing spec, but it sounds like it could be useful for folks
November 11, 2025 at 2:24 PM
See also discuss.python.org/t/differenti..., where we and the pyrefly team tried to push for a change to the spec to improve things here. but I think at that point, neither we nor the pyrefly team realised how much ecosystem code depended on the legacy mypy/pyright behaviour ☹️
Differentiating between initialized and uninitialized assignments on class toplevel
In Python, attributes that are declared at class toplevel but are uninitialized there cannot be directly accessed from the class itself at runtime. For instance, class Foo: x: int Foo.x # Runtime...
discuss.python.org
October 30, 2025 at 11:33 AM
In particular, having different semantics to mypy/pyright here meant that ty was unusable for projects using sqlalchemy, which felt like too big a compatibility break, sadly
October 30, 2025 at 12:43 AM
See github.com/astral-sh/ty.... We used to have the strict behaviour you're asking for here. But too much ecosystem code implicitly depends on type checkers assuming that variables declared in the class body will also be accessible on the class itself as well as instances 😞
Declared-only attributes are not accessible on instances of the class · Issue #384 · astral-sh/ty
Summary When using SQLAlchemy's declarative models with Mapped type annotations, ty incorrectly reports that model class attributes (which represent database columns) can only be accessed on instan...
github.com
October 30, 2025 at 12:41 AM
Reposted by Alex Waygood
Do you think the Gruffalo is lying to his child about the physical prowess of the big bad mouse or has he truly instilled a false memory in himself because he can’t accept the reality? This isn’t a take I guess but, makes you think
September 10, 2025 at 8:38 PM
Yes: having to do a tiny bit of extra work makes it feel more ritualised and special. There's also the performative nature of being able to collect *physical things* and *display them* as artifacts in your living room for others to see, which can e.g. start conversations!
August 10, 2025 at 9:37 PM
Tip: pprint.pp does the same thing but has better (much less surprising!) defaults
July 28, 2025 at 12:48 PM
TYVM!
July 19, 2025 at 4:45 PM
Ask not for whom the grant shapps, it shapps for thee
July 18, 2025 at 7:52 AM
I groaned out loud at the last sentence, thank you
July 16, 2025 at 7:20 PM
Pydantic is another uv-based project already in that workflow — you might be able to look at that one for reference
July 16, 2025 at 3:45 PM
Oh, that's very kind of you to ask! Sure — the workflow where we run the cattrs test suite every night is github.com/python/typin... . The workflow is also run on PRs that edit the workflow file itself. A PR updating that workflow would be welcome!
github.com
July 16, 2025 at 3:42 PM
They're everywhere in Hertfordshire! We see them regularly over our house
June 16, 2025 at 9:06 PM
We're working on it! Sorry for the delay. There were a couple of big changes to extension modules that landed in the last beta which have been tricky to reimplement in Python- build-standalone. But AFAIK we're nearly there
June 2, 2025 at 4:04 PM
It's fun if you look at different classical composers' methods of writing music. Some composers apparently found it easy/enjoyable, but the famous counter-example is Beethoven. His notebooks are full of bars of music angrily scribbled out as he struggled to express what he wanted
May 29, 2025 at 7:13 PM
I always felt exactly this way about writing. I loved having written something. Not so much writing it. It's probably a good thing I'm not a journalist anymore 😄
May 29, 2025 at 6:59 PM