Skip to content

AttributeError with timeinterval.githubformat() and input 2025-02-10..2025-02-28 #112

@amotl

Description

@amotl

Problem

  File "/Users/amo/dev/tech-writing/sources/rapporto/.venv/lib/python3.12/site-packages/aika/model.py", line 37, in githubformat
    buffer = f"{self.start.strftime(github_datetime_format)}"
                ^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'strftime'

Reason

This shortcut uses cast to trick the type checker, but does the wrong thing.

aika/aika/core.py

Lines 139 to 140 in a15202e

if ".." in when:
return t.cast(trange, when.split(".."))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions