python-caldav / caldav

Apache License 2.0
313 stars 91 forks source link

Typehints #331

Closed mahnazfallahh closed 9 months ago

mahnazfallahh commented 11 months ago

i hope this message finds you well , i add typehints in base.py and cdav.py and I'm open to any feedback .

tobixen commented 11 months ago

(This is a partial implementation of #328)

Apparently one should use square brackets rather than ordinary brackets for the Union class, ref https://docs.python.org/3/library/typing.html#typing.Union

Be aware that most of the work is already done in the typeshed project, code can be merged from there - like, base.py is covered in https://github.com/python/typeshed/blob/main/stubs/caldav/caldav/elements/base.pyi

There also exists some tool for merging it - see also https://github.com/python/typeshed/pull/10485#issuecomment-1643745094

mahnazfallahh commented 11 months ago

ok i'll fix them