Skip to content

Commit

Permalink
Merge pull request #37 from apple1417/master
Browse files Browse the repository at this point in the history
fix hinting of `unrealsdk.hooks.Type` members
  • Loading branch information
apple1417 authored Jun 9, 2024
2 parents fe675b6 + b821ed2 commit b628dba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Cache Clang
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-clang
with:
path: C:\Program Files\LLVM
Expand Down Expand Up @@ -55,15 +55,15 @@ jobs:
steps:
- name: Restore Clang Cache
if: startswith(matrix.preset, 'clang')
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\Program Files\LLVM
key: ${{ runner.os }}-clang-${{ env.CLANG_VERSION }}
fail-on-cache-miss: true

- name: Add MSVC to PATH
if: startswith(matrix.preset, 'msvc')
uses: TheMrMilchmann/setup-msvc-dev@v2
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: ${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}

Expand All @@ -73,12 +73,12 @@ jobs:
# We only actually need this python version to run the download script, we're not going to link
# against it, so don't need to specify arch
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ">=3.10"

- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
# xwin does take long enough that caching's worth it
- name: Restore xwin cache
if: contains(matrix.preset, 'cross')
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-xwin
with:
path: ~/xwin
Expand All @@ -182,7 +182,7 @@ jobs:
--output ~/xwin
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:

steps:
- name: Restore Clang Cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\Program Files\LLVM
key: ${{ runner.os }}-clang-${{ env.CLANG_VERSION }}
Expand All @@ -227,12 +227,12 @@ jobs:
uses: lukka/get-cmake@latest

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ">=3.10"

- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -278,14 +278,14 @@ jobs:

steps:
- name: Restore Clang Cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\Program Files\LLVM
key: ${{ runner.os }}-clang-${{ env.CLANG_VERSION }}
fail-on-cache-miss: true

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run clang-format
run: |
Expand All @@ -303,7 +303,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
Expand All @@ -313,12 +313,12 @@ jobs:

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Run pyright
uses: jakebailey/pyright-action@v1
uses: jakebailey/pyright-action@v2
with:
working-directory: ./stubs

Expand All @@ -327,7 +327,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Ruff Linting
uses: chartboost/ruff-action@v1
Expand Down
6 changes: 3 additions & 3 deletions stubs/unrealsdk/hooks/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class Type(metaclass=EnumMeta):
__members__: ClassVar[dict[str, Type]]
__entries: ClassVar[dict[str, tuple[Type, str]]]

PRE: ClassVar[Type]
POST: ClassVar[Type]
POST_UNCONDITIONAL: ClassVar[Type]
PRE = ...
POST = ...
POST_UNCONDITIONAL = ...

def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
Expand Down

0 comments on commit b628dba

Please sign in to comment.