Skip to content

Commit

Permalink
Update NativeMixin impl to remove mypy error.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Sep 21, 2024
1 parent 3dd84a7 commit 91f34a2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dmoj/executors/asm_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ class UnknownPlatformMixin(ASMExecutor):
abi = PTBOX_ABI_INVALID


NativeMixin: Any = (
[cls for cls in (PlatformX86Mixin, PlatformX64Mixin, PlatformARMMixin, PlatformARM64Mixin) if cls.abi == NATIVE_ABI]
or [UnknownPlatformMixin]
)[0]
NativeMixin: Any = next(
(
cls
for cls in (PlatformX86Mixin, PlatformX64Mixin, PlatformARMMixin, PlatformARM64Mixin)
if cls.abi == NATIVE_ABI
),
UnknownPlatformMixin,
)

0 comments on commit 91f34a2

Please sign in to comment.