rdozier-work / docker-stubs

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

use backward compatible Optional and Union syntax rather than `type | None` #5

Open kalfa opened 1 month ago

kalfa commented 1 month ago

Hi

would it be possible to use a more backward compatible syntax for typing, rather than piping-ing it?

e.g. Optional[str] rather than str | None or Union[int, str] rather than int | str

beside that, pyproject says it's for python2.8, but I believe the syntax is for >2.10, making it de facto a version problem

I use 2.9 in some project, and would like to use the stubs. currently I am adding a bunch of type: ignore because stubs are not evaluated.

thanks!

rdozier-work commented 1 month ago

good idea! i can try and make a quick PR

On Mon, Sep 9, 2024 at 11:21 AM Cosimo Alfarano @.***> wrote:

Hi

would it be possible to use a more backward compatible syntax for typing, rather than piping-ing it?

e.g. Optional[str] rather than str | None or Union[int, str] rather than int | str

beside that, pyproject says it's for python2.8, but I believe the syntax is for >2.10, making it de facto a version problem

I use 2.9 in some project, and would like to use the stubs. currently I am adding a bunch of type: ignore because stubs are not evaluated.

thanks!

— Reply to this email directly, view it on GitHub https://github.com/rdozier-work/docker-stubs/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6TZLB3RTQPBOJOGLYJOFEDZVW4F5AVCNFSM6AAAAABN4ZIRZSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTIMRVHE2TAOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>