Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurdok committed Oct 15, 2023
1 parent ec9d5ac commit fe4c501
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[mypy]
warn_return_any = True
warn_unused_configs = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
no_implicit_optional = True
strict_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
6 changes: 3 additions & 3 deletions src/spanreed/plugins/recurring_payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import yaml
import jinja2

from spanreed.apis.todoist import Todoist, Task
from spanreed.apis.todoist import Todoist, Task, Project
from spanreed.plugins.todoist import TodoistPlugin
from spanreed.apis.telegram_bot import TelegramBotApi
from spanreed.apis.obsidian_webhook import (
Expand Down Expand Up @@ -51,7 +51,7 @@ class ObsidianLog:
class RecurringPayment:
todoist_label: str
todoist_task_template: str
todoist_project_id: int
todoist_project_id: str
date_format: str
recurrence_cost: float
recurrence_info: RecurrenceInfo
Expand Down Expand Up @@ -141,7 +141,7 @@ async def ask_for_user_config(cls, user: User) -> None:
"Please choose the project where you'd like to create the task:",
[p.name for p in projects],
)
todoist_project_id = projects[todoist_project].id
todoist_project_id: str = projects[todoist_project].id

recurrence_cost = float(
await bot.request_user_input(
Expand Down

0 comments on commit fe4c501

Please sign in to comment.