Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nice_time has incorrect param type annotation #223

Open
NeonDaniel opened this issue Feb 8, 2022 · 0 comments
Open

nice_time has incorrect param type annotation #223

NeonDaniel opened this issue Feb 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@NeonDaniel
Copy link
Member

Describe the bug
nice_time indicates an argument type of datetime, but it should be datetime.datetime

dt (datetime): date to format (assumes already in local timezone)

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):

  • Device type: Desktop
  • OS: Ubuntu 20.04
  • Mycroft-core version: N/A
  • Other versions: lingua-franca-0.4.2
@NeonDaniel NeonDaniel added the bug Something isn't working label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant