MycroftAI / lingua-franca

Mycroft's multilingual text parsing and formatting library
Apache License 2.0
73 stars 77 forks source link

nice_time has incorrect param type annotation #223

Open NeonDaniel opened 2 years ago

NeonDaniel commented 2 years ago

Describe the bug nice_time indicates an argument type of datetime, but it should be datetime.datetime https://github.com/MycroftAI/lingua-franca/blob/eb6d677d4f8d201e1bcf645382eb262c7d0688f1/lingua_franca/format.py#L273

To Reproduce Steps to reproduce the behavior:

from mycroft.util.format import nice_time
nice_time(datetime.now(tz), lang)
# editor will warn: Expected type 'datetime.pyi', got 'datetime' instead 

Expected behavior nice_time method should expect a datetime type, not datetime.pyi

Environment (please complete the following information):