Doist / Doist/todoist-api-python
Due date's type is partially unknown in pyright strict mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 250
- Forks
- 34
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 1
Description
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
Version information:
- Package version: 3.01
- Python version: 3.13
Additional information
N/A
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ApiDue type definition and reproduce the reported task.due.date access with Python 3.13 and pyright strict mode. Trace why the date type retains an unknown parameter, then verify that the reproduction no longer reports a partially unknown type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100