eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

196
active users

#mypy

0 posts0 participants0 posts today
Continued thread

Okay, so, fans of the #TwistedFramework help me out here:

I am mucking around with writing a simple new thing that, in order to have type annotations that aren't *completely* useless, needs to deal with the fact that Protocol and Factory aren't annotated.

But adding annotations makes the entire framework notice that the pattern of paired-Protocol-and-Factory subclasses are inherently LSP violations, because .protocol and .factory are writable attributes and thus invariant.

I have been addicted to #mypy type checking my #python projects over the last week. After creating several helper scripts for the process of getting from >1000 errors to 0, I am working on making a centralized library to #opensource !

If you use the `--edu` flag, the system will show you educational guidance, and also showcase tutorials that are built-in to the CLI! (That feature isn't in yet, but I am excited to build it)

All of the lessons I have learned from making my projects MyPy Compliant, I hope I can use this tool to teach others, and also help myself with all my future Python Projects!

New account, so new #introduction. Let's do it again!

I have a
#MastersDegree in #ComputerScience and #ComputerEngineering. I went to #NMU for undergrad and #MSU for my graduate degree. I currently work at #UChicago for the #TMWCenter, which focuses on helping young children acquire language (and therefore other learning skills) faster.

In my spare time, I develop
#OpenSourceSoftware such as
- a
#SphinxDoc extension that embed #Fediverse comments on your page
- a library to talk to
#ManifoldMarkets from native #Python
- a
#PredictionMarket manager using the above
- a
#transpiler from a subset of Python to #OpenStreetMaps's #OverpassQL
- bug fixes to many other projects, including
#mypy, #base58, #attrs, #CPython, & more

I spend a fair bit of my time these days on
#MathResearch, specifically into the #ThueMorse Sequence and its extensions.

I'm also a hobbyist editor on OpenStreetMap.

#Demisexual, #transfem, and happily engaged to my #enby sweetheart.

We have two cats:
#OpheTheLoaf and #MayalaranTheCat (yes, from #StormlightArchive) See here for more on them!

I speak English fluently, Spanish haltingly, and am trying to learn Chinese

#queer #Chicago

TransFem SpaceOlivia A-C (@LivInTheLookingGlass)These are our cats, #OpheTheLoaf and #MayalaranTheCat. Ophelia was originally my partner's, we live together full time now, and are an integrated family Fun facts about Ophelia: * She is missing a tooth, so her lip sometimes gets stuck open in a cute way * She has an "activation noise" that sounds kinda like a pigeon * She will often do 10/10 loafs, hence the nickname Some facts about Maya: * Her favorite hobby is judging the neighbors * She is very anxious * She has an incredibly dainty play style * She has a series of increasingly ridiculous nicknames: Mayalaran -> Maya -> Mayo -> Aioli -> Au Jus (Follow the hashtags if you want just my cats) #CatsOfMastodon #CatsOfFedi (📎8)

Oh dang, my #introduction post is waaay out of date now. Let's do it again!

I have a #MastersDegree in #ComputerScience and #ComputerEngineering. I went to #NMU for undergrad and #MSU for my graduate degree. I currently work at #UChicago for the #TMWCenter, which focuses on helping young children acquire language (and therefore other learning skills) faster.

In my spare time, I develop #OpenSourceSoftware such as

I spend a fair bit of my time these days on #MathResearch, specifically into the #ThueMorse Sequence and its extensions.

I'm also a hobbyist editor on OpenStreetMap.

#Demisexual, #transfem, and happily engaged to my #enby sweetheart.

We have two cats: #OpheTheLoaf and #MayalaranTheCat (yes, from #StormlightArchive)

How on earth are users of django-stubs getting the “id" field to work properly? Does nobody ever refer to it in code? Am I holding it wrong? I have so many instances of ‘error: "NominatingMemberProfile" has no attribute "id"' in my mypy output, and I can't help but wonder what the hell I'm doing wrong. #django #mypy #python

github.com/python/mypy/issues/

I was trying to integrate mongo-types into mongoengine, but for fields we need to write many overloads.

I don't want to do this, as it would clutter the codebase.

Django uses mypy plugin to do this kind of thing, but it works only for mypy.

Is there folks who know internals of mypy and it's plugins? how does it work? does it generate something like types for matching classes/functions? Would it be possible to export this information into pyi?

GitHubExport types from a plugin as `pyi` · Issue #17315 · python/mypyBy last-partizan
Replied in thread

@nedbat I couldn't find a cached version (quite probably I didn't look hard enough).

In my case, the offending part was:

class Foo:
bar: Bar = None

Tried:

class Foo:
bar: Optional[Bar] = None

This makes #mypy happy in that spot, but then I would have needed to disambiguate the type (via asserts and the like) all the time, so I went for something simple yet not entirely satisfactory:

class Foo:
bar: Bar = None # type: ignore

And everything else expects bar to be Bar, not None.

It's time for a re-#introduction!

I'm a #MastersStudent in #ComputerScience. In my spare time, I develop #OpenSourceSoftware such as
- a library to talk to #ManifoldMarkets from native #Python
- a #PredictionMarket manager using the above
- a transpiler from a subset of Python to #OpenStreetMaps's OverpassQL
- bug fixes to many other projects, including #mypy, #base58, #attrs, #cpython, and more

I'm also a hobbyist editor on OpenStreetMap.

#Bi, #transfem, and happily dating my enby sweetheart