Skip to content

Commit 2a7e595

Browse files
authored
Add ty type checker with all rules as errors (#239)
#### Problem The project lacked ty type checker configuration, leaving potential type issues undetected. #### Solution Add `[tool.ty.rules] all = "error"` to pyproject.toml and add a missing `@override` decorator in `_main.py` to satisfy ty's checks.
1 parent 5876039 commit 2a7e595

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,6 @@ commands = [
131131
["coverage", "report"],
132132
]
133133
dependency_groups = ["dev"]
134+
135+
[tool.ty.rules]
136+
all = "error"

sqlite_export_for_ynab/_main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from typing import Any
1515
from typing import Literal
1616
from typing import overload
17+
from typing import override
1718
from typing import TYPE_CHECKING
1819

1920
import aiosqlite
@@ -67,6 +68,7 @@ def __init__(self, separator: str = "/", table_column: Column | None = None):
6768
self.separator = separator
6869
super().__init__(table_column=table_column)
6970

71+
@override
7072
def render(self, task: Task) -> Text:
7173
"""Show completed/total."""
7274
completed = int(task.completed)

0 commit comments

Comments
 (0)