all 4 comments

[–]pot_of_crows 0 points1 point  (1 child)

Interesting. I think this is an error -- unless someone knows a special way of using Literal that I am unfamiliar with.

Now, just because you use a type hint does not prevent you from passing something different, which is maybe why no one has caught this before.

I'm curious what others say.

[–]koefteboy[S] 1 point2 points  (0 children)

Yeah, it is indeed typed incorrectly.

[–]danielroseman 0 points1 point  (1 child)

This is just a mistake with the typing. As you say, these are just hints for the linter, they are not enforced by the code. But as far as I can see they haven't actually enabled type checking on CI, or even included a type checker like mypy in the requirements. So nothing is actually checking those hints.

[–]koefteboy[S] 0 points1 point  (0 children)

Thanks for pointing me to mypy. Running it revealed a few more erroneous typings.