Skip to content

Due date's type is partially unknown in pyright strict mode #193

Description

@AlexZasorin

Bug description

I'm running into an issue with the ApiDue type where pyright (and basedpyright) report it as being partially unknown in strict mode.

error: Type of "date" is partially unknown
Type of "date" is "DatePattern[Unknown] | DateTimePattern[Unknown] | UTCDateTimePattern[Unknown]" [reportUnknownMemberType]

It's entirely possible that I'm doing something wrong here, or this is an issue with pyright/basedpyright, so apologies if this is better as a question rather than a bug report.

Expected behaviour

I expected that the usage of the ApiDue type (e.g. task.due.date) does not give a partially unknown error in pyright strict mode.

Is reproducible

Yes

To reproduce

    todoist_api = TodoistAPIAsync('token')
    task_generator = await todoist_api.filter_tasks(query=filter)
    async for task_list in task_generator:
        for task in task_list:
            if task.due:
                print(task.due.date)

Steps taken to try to reproduce

N/A

Screenshots

Image

Version information:

  • Package version: 3.01
  • Python version: 3.13

Additional information

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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