Skip to content

Commit f50de13

Browse files
committed
fix types
1 parent c6bcdb6 commit f50de13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

constants/_meta.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
"""
2323
from __future__ import annotations
2424

25-
from typing import TYPE_CHECKING, Any, NoReturn
25+
from typing import TYPE_CHECKING, Any, NoReturn, cast
2626

2727
from core import CONFIG
2828

29+
2930
if TYPE_CHECKING:
3031
from typing_extensions import Self
3132

@@ -38,7 +39,7 @@ def __new__(mcs, name: str, bases: tuple[type, ...], attrs: dict[str, Any]) -> S
3839
return super().__new__(mcs, name, bases, attrs)
3940

4041
try:
41-
section: Tokens | Database | Logging = CONFIG[name.upper()] # type: ignore # dynamic code of static types
42+
section = cast(Tokens | Database | Logging, CONFIG[name.upper()])
4243
except KeyError:
4344
return super().__new__(mcs, name, bases, attrs)
4445

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ combine_star = true
3333

3434

3535
[tool.pyright]
36-
ignore = ["core/utils/paginator.py", "constants/_meta.py"] # TODO: Undo this when someone fixes the module lol
36+
ignore = ["core/utils/paginator.py"] # TODO: Undo this when someone fixes the module lol
3737
useLibraryCodeForTypes = true
3838
typeCheckingMode = "strict"
3939
pythonVersion = "3.11"

0 commit comments

Comments
 (0)