rdozier-work / docker-stubs

type stubs for the Docker Python SDK
8 stars 2 forks source link

Resolve #2 #3

Closed Tatsh closed 6 months ago

Tatsh commented 6 months ago

Resolves #2

It is far from complete typing but it is much further along. The most useful cases should be covered mostly.

I made types.io private by convention because an IDE might give that as an option in auto-completion and the types.io module does not exist in the real code.

I filled in most of the type arguments for dict.

Generally if something accepts list[str] I made it also accept tuple[str, ...] but I examined the relevant code in docker-py to make sure.

I ran black on the project.

Hope you can make a new release soon with these.

Edit: Yes I know for list[str] | tuple[str, ...] it should actually be Sequence[str] but the major downside to this is that str | list[str] | tuple[str, ...] == Sequence[str] and 99% of the the time str is not a valid argument for these cases.

rdozier-work commented 6 months ago

LGTM!

rdozier-work commented 6 months ago

Now available in v0.1.1a0