<whitequark[cis]>
mypy will yell at you for Unsigned[1]
<whitequark[cis]>
now, am I potentially open to adding annotations that exclusively work with pyright? maybe, I'd need to see an RFC proposing it comprehensively
<whitequark[cis]>
is going from "illegal according to Python annotations" to "illegal according to Python annotations but different" an improvement? I don't know
<RobTaylor[m]>
Hmm, If i'm reading the python type spec correctly, generic subscripting just must 'confirm to normal subscripting rules'
<whitequark[cis]>
there's two parts to it: one run-time (where __class_getitem__ gets actually called) and one typechecking-time
<whitequark[cis]>
the latter is matched against the grammar in the docs, with pyright being more lax about it
<RobTaylor[m]>
yeah, i'm unsure, nontypes in generics is something useful, and doesnt seem to be explictly banned, and only implicitly supported via Literal. I guess it's a case of asking
<whitequark[cis]>
it's explicitly banned in the link I've given above
<whitequark[cis]>
the grammar is unambiguous in that it doesn't allow nontypes in subscripts
<RobTaylor[m]>
ah, yeah i see, missed that
FFY00 has quit [Remote host closed the connection]
<Wanda[cis]>
<whitequark[cis]> "the grammar is unambiguous in..." <- <del>I mean, `typenum` already solved that problem</del>
toshywoshy has quit [Read error: Connection reset by peer]
toshywoshy has joined #amaranth-lang
Chips4MakersakaS has joined #amaranth-lang
<Chips4MakersakaS>
<whitequark[cis]> "ultimately i feel like python..." <- I am a one man company so I don't consider my dev environment a corporate place :)
<Chips4MakersakaS>
I do like static typing in the IDE. I personally feel this is more productive than the run-time type checking Amaranth provides.
<whitequark[cis]>
the run-time typechecking isn't there to improve productivity in and of itself; it's there to make sure nobody ever ends up in a situation where they're getting some error that's probably caused by types, but they don't understand why because it happens deep in Amaranth guts
<whitequark[cis]>
it's kind of a last resort thing or a backstop that covers everyone using Amaranth in any environment no matter who they are
<whitequark[cis]>
(of course, not chasing type errors in Amaranth guts does improve productivity, but that's a secondary effect to reducing frustration of newcomers)
mindw0rk has quit [Ping timeout: 252 seconds]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Ping timeout: 276 seconds]
mindw0rk has joined #amaranth-lang
jn has quit []
jn has joined #amaranth-lang
jn has joined #amaranth-lang
jn has quit [Changing host]
<RobTaylor[m]>
Catherine: i hacked up a patch last night to allow the use of Annotated[] in data.Flow members, for those users who wish to have full type checking available for their codebase. Would it be of interest if I finish that up properly, and would that require an RFC? Thanks!... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/dkaOzlzleEdDJibKuXxajUVW>)
frgo has joined #amaranth-lang
<RobTaylor[m]>
a different option for these users would be a docs addition where to use @no_type_check, but I think that doesn't work with classes in mypy still (works with pyright>1.1.347 though)
<RobTaylor[m]>
<RobTaylor[m]> "a different option for these..." <- oh no. pyright also doesnt honour @no_type_check on classes
frgo has quit [Remote host closed the connection]
frgo has joined #amaranth-lang
<whitequark[cis]>
<RobTaylor[m]> "Catherine: i hacked up a patch..." <- > <@rob_chipflow:matrix.org> Catherine: i hacked up a patch last night to allow the use of Annotated[] in data.Flow members, for those users who wish to have full type checking available for their codebase. Would it be of interest if I finish that up... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/IOxmeLzwhZPDJQxMgAgQALqI>)
<RobTaylor[m]>
whitequark[cis]: hmm, its more about users actually being able to write code with a type checker enabled
<RobTaylor[m]>
rather than typing for amaranth overall
<RobTaylor[m]>
its only view/struct/union that breaks
<RobTaylor[m]>
happy to write that up though
<RobTaylor[m]>
currently even switching to basic doesnt work with pyright :(
<RobTaylor[m]>
(i.e. the only solution i have right now is to # type ignore)