Jukka Lehtosalo

Results 479 comments of Jukka Lehtosalo

@johnthagen Yes, using an `Any` return type is clearly a compromise. I also agree that for code completion it makes sense to try to infer a type even if it's...

This is a design limitation of mypy. Mypy currently doesn't even try to keep track of the lengths of list objects. However, issues similar to this come up every once...

We can use this issue to track both fixed-length lists and sequences for now.

Since this will impact many projects, we may want to announce this in the blog post for the previous feature release to give users a chance to prepare for this....

Mypy doesn't behave correctly, but it may be somewhat difficult to fix in mypy. As a workaround, you can declare the global at module top level: ```py myglobal: int def...

@glyph Perhaps you could use `# type: ignore` to silence the error as suggested above? It's clearly not optimal, though. Can you give more information about your use case? I...

Makes sense, though I'm not sure if lifting the restriction would be sufficient to allow the decorator to be checked statically. Right now a runtime check is probably the best...

> Is there any way to overcome this In some cases you may use `if TYPE_CHECKING:` to conditionally define the base class so that mypy sees the base class as...

One option could be to have an official/documented script in the mypy repo (and possibly installed with mypy) that does this -- run mypy in parallel (separate processes) using different...

I wonder if this might have been caused by an update to the ubuntu image github actions uses. This is the current version: ``` Image: ubuntu-20.04 Version: 20220828.1 ``` The...