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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "git@github.com:bl-sdk/common_dotfiles.git",
"commit": "3d7189e61172cb95877261df8313ae595fe6c02d",
"commit": "cee5c9dbf5b95f57bb636e5138171aa6a4964cf1",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -16,7 +16,7 @@
"include_cpp": false,
"include_py": true,
"_template": "git@github.com:bl-sdk/common_dotfiles.git",
"_commit": "3d7189e61172cb95877261df8313ae595fe6c02d"
"_commit": "cee5c9dbf5b95f57bb636e5138171aa6a4964cf1"
}
},
"directory": null
Expand Down
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ game specific things:

# Changelog

### v1.10
- Linting fixups.

### v1.9
- Added a new `CoopSupport.HostOnly` value.

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .dot_sdkmod import open_in_mod_dir

# Need to define a few things first to avoid circular imports
__version_info__: tuple[int, int] = (1, 9)
__version_info__: tuple[int, int] = (1, 10)
__version__: str = f"{__version_info__[0]}.{__version_info__[1]}"
__author__: str = "bl-sdk"

Expand Down
4 changes: 2 additions & 2 deletions hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class HookType[R: PreHookRet | PostHookRet = Any]:
__wrapped__: Callable[[UObject, WrappedStruct, Any, BoundFunction], R]

hook_identifier: str
hook_funcs: list[tuple[str, Type]] = field(default_factory=list)
hook_funcs: list[tuple[str, Type]] = field(default_factory=list[tuple[str, Type]])

def enable(self) -> None:
"""Enables all hooks this function is bound to."""
Expand Down Expand Up @@ -209,7 +209,7 @@ def decorator(func: HookCallbackFunction[R] | HookCallbackMethod[R]) -> HookType
hook: HookType[R]
if isinstance(func, HookType):
# If we're directly wrapping another hook, use it
hook = func
hook = func # pyright: ignore[reportUnknownVariableType]
else:
# Look to see if we wrapped another hook function inbetween somewhere
wrapped_func = func
Expand Down
2 changes: 1 addition & 1 deletion mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __post_init__(self) -> None: # noqa: C901 - difficult to split up
case BaseOption() if find_options:
new_options.append(value)
case HookType() if find_hooks:
bound_hook: HookType = value.bind(self)
bound_hook: HookType = value.bind(self) # pyright: ignore[reportUnknownVariableType]
new_hooks.append(bound_hook)
setattr(self, name, bound_hook)
case AbstractCommand() if find_commands:
Expand Down
2 changes: 1 addition & 1 deletion mod_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def update_fields_with_module_search( # noqa: C901 - difficult to split up
new_options.append(value)

case HookType() if find_hooks:
hook: HookType = value
hook: HookType = value # pyright: ignore[reportUnknownVariableType]
new_hooks.append(hook)

case AbstractCommand() if find_commands:
Expand Down
2 changes: 1 addition & 1 deletion mod_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class ComponentInfo:
version: str

# They should also all add themselves here, so we can record their versions
components: list[ComponentInfo] = field(default_factory=list)
components: list[ComponentInfo] = field(default_factory=list[ComponentInfo])

# Base mod options
get_latest_release_button: ButtonOption = field(init=False)
Expand Down
2 changes: 1 addition & 1 deletion options.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class HiddenOption[J: JSON](ValueOption[J]):
"""

# Need to redefine on change so that it binds to J@HiddenOption, not J@ValueOption
on_change: Callable[[Self, J], None] | None = None
on_change: Callable[[Self, J], None] | None = None # pyright: ignore[reportIncompatibleVariableOverride]

is_hidden: Literal[True] = field( # pyright: ignore[reportIncompatibleVariableOverride]
default=True,
Expand Down