partizan · @partizan
159 followers · 13263 posts · Server mstdn.social

Sometimes I contribute types to opensource projects, and while some projects are welcoming type contributions, others either not consider it a priority or even oppose including types.

For me typing greatly improves development process. How about you?

Are you using types in your projects?

#pythontyping #Python

Last updated 1 year ago

partizan · @partizan
159 followers · 13263 posts · Server mstdn.social

@ambv so, what do you think about this problem?

It also behaves the same way in mypy. But here bug is not closed, and i'm hoping it can be fixed.

github.com/python/mypy/issues/

#pyright #mypy #pythontyping #Python

Last updated 1 year ago

пан Партизан · @partizan
157 followers · 13059 posts · Server mstdn.social

Turns out using `func(kwargs)`becomes very inconvinient, when you're using type-checking.

Pyright 1.1.312 landed a change:

> ... The new behavior matches that of mypy and assumes that the unpacked dict may supply arguments for all otherwise-unmatched keyword parameters even if they have default argument values.

github.com/microsoft/pyright/i

And now i need `# type: ignore` for each `kwargs`.

@hynek any ideas how to approach this?

Or maybe someone on ?

#pythontyping #Python #europython

Last updated 1 year ago

пан Партизан · @partizan
156 followers · 13034 posts · Server mstdn.social

Is there a way to create type stub only for part of the library?

For example: I want to include types for a single object, but don't want to maintain full copy of the library.

github.com/carltongibson/djang

#mypy #pylance #pyright #pythontyping #Python

Last updated 1 year ago