Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = ["discord_logging.handler", "mplcyberpunk", "parsedatetime", "validators"]

[[tool.mypy.overrides]]
ignore_errors = true
module = ["db.core.migrations.*"]
Expand Down Expand Up @@ -190,6 +186,7 @@ classmethod-decorators = ["typed_classproperties.classproperty"]
extend-ignore-names = ["BROKEN_*_MESSAGE", "INVALID_*_MESSAGE", "NO_*_MESSAGE"]

[tool.ruff.lint.per-file-ignores]
"stubs/**.pyi" = ["N"]
"stubs/discord/**/*.pyi" = ["F403"]
"stubs/discord/commands/__init__.pyi" = ["F405"]
"tests/**/test_*.py" = ["S101"]
Expand Down
Empty file.
20 changes: 20 additions & 0 deletions stubs/discord_logging/handler.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import logging
from collections.abc import Mapping, Sequence
from typing import override

__all__: Sequence[str] = ("DiscordHandler",)

class DiscordHandler(logging.Handler):
@override
def __init__(
self,
service_name: str,
webhook_url: str,
colours: Mapping[int | None, int] = ...,
emojis: Mapping[int | None, str] = ...,
avatar_url: str | None = ...,
rate_limit_retry: bool = ...,
embed_line_wrap_threshold: int = ...,
message_break_char: str | None = ...,
discord_timeout: float = ...,
) -> None: ...
11 changes: 11 additions & 0 deletions stubs/mplcyberpunk/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from collections.abc import Sequence

import matplotlib

__all__: Sequence[str] = ("add_bar_gradient",)

def add_bar_gradient(
bars: matplotlib.container.BarContainer,
ax: matplotlib.axes.Axes | None = ...,
horizontal: bool = ...,
) -> None: ...
17 changes: 17 additions & 0 deletions stubs/parsedatetime/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import datetime
import time
from collections.abc import Sequence
from zoneinfo import ZoneInfo

__all__: Sequence[str] = ("Calendar",)

class Calendar:
def parseDT(
self,
dateString: str,
sourceTime: (
time.struct_time | datetime.datetime | datetime.date | datetime.time | None
) = ...,
tzinfo: ZoneInfo | None = ...,
version: int | None = ...,
) -> tuple[time.struct_time, int]: ...
Loading