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
23 changes: 15 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: keybinds

- name: Checkout mods_base
uses: actions/checkout@v6
Expand All @@ -39,23 +41,27 @@ jobs:
python-version: ">=3.13"

- name: Generate stubs
working-directory: .pyunrealsdk
run: |
cd .pyunrealsdk
pip install -r stubgen/requirements.txt
python -m stubgen WILLOW ../.stubs

- name: Add stubs to pyproject
run: sed -i 's/# CI ADD STUB PATH HERE/stubPath = ".stubs"\nreportMissingModuleSource = false/' pyproject.toml
cd ..
rm -r .pyunrealsdk
sed -i 's/# CI ADD STUB PATH HERE/stubPath = "..\/.stubs"\nextraPaths = ["..\/"]\nreportMissingModuleSource = false/' keybinds/pyproject.toml

- name: Run pyright
uses: jakebailey/pyright-action@v3
with:
working-directory: ${{ github.workspace }}/keybinds/

ruff:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: keybinds

- name: Checkout mods_base
uses: actions/checkout@v6
Expand All @@ -76,20 +82,21 @@ jobs:
python-version: ">=3.13"

- name: Generate stubs
working-directory: .pyunrealsdk
run: |
cd .pyunrealsdk
pip install -r stubgen/requirements.txt
python -m stubgen WILLOW ../.stubs
cd ..
rm -r .pyunrealsdk

- name: Add stubs to pyproject
run: sed -i 's/# CI ADD STUB PATH HERE/stubPath = ".stubs"\nreportMissingModuleSource = false/' pyproject.toml
sed -i 's/# CI ADD STUB PATH HERE/stubPath = "..\/.stubs"\nextraPaths = ["..\/"]\nreportMissingModuleSource = false/' keybinds/pyproject.toml

- name: Run Ruff Linting
uses: astral-sh/ruff-action@v4.0.0
with:
src: keybinds/

- name: Run Ruff Formatting
uses: astral-sh/ruff-action@v4.0.0
with:
src: keybinds/
args: format --check
6 changes: 2 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from functools import wraps
from typing import TYPE_CHECKING, Any

from unrealsdk.hooks import Type

from mods_base import EInputEvent, KeybindType, hook
from mods_base.mod_list import base_mod
from unrealsdk.hooks import Type

if TYPE_CHECKING:
from unrealsdk.unreal import BoundFunction, UObject, WrappedStruct

from mods_base.keybinds import KeybindCallback_Event, KeybindCallback_NoArgs
from unrealsdk.unreal import BoundFunction, UObject, WrappedStruct

__all__: tuple[str, ...] = (
"__author__",
Expand Down