Skip to content

nice_time has incorrect param type annotation #223

@NeonDaniel

Description

@NeonDaniel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions