Skip to content

Commit

Permalink
Avoid 3.10 type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel committed Apr 13, 2023
1 parent 980142c commit 5011b2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions resources/integrity_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import binascii
import threading

from typing import Union
from pathlib import Path

CHUNK_LENGTH = 4 + 32
Expand Down Expand Up @@ -43,7 +44,7 @@ class ChunklistVerification:
... print(chunk_obj.error_msg)
"""

def __init__(self, file_path: Path, chunklist_path: Path | bytes) -> None:
def __init__(self, file_path: Path, chunklist_path: Union[Path, bytes]) -> None:
if isinstance(chunklist_path, bytes):
self.chunklist_path: bytes = chunklist_path
else:
Expand All @@ -59,7 +60,7 @@ def __init__(self, file_path: Path, chunklist_path: Path | bytes) -> None:
self.status: ChunklistStatus = ChunklistStatus.IN_PROGRESS


def _generate_chunks(self, chunklist: Path | bytes) -> dict:
def _generate_chunks(self, chunklist: Union[Path, bytes]) -> dict:
"""
Generate a dictionary of the chunklist header and chunks
Expand Down
4 changes: 3 additions & 1 deletion resources/sys_patch/sys_patch_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import os
import logging
import subprocess

from typing import Union
from pathlib import Path
from datetime import datetime

Expand Down Expand Up @@ -213,7 +215,7 @@ def install_rsr_repair_binary(self):
logging.info(f" - Failed to install RSRRepair: {result.stdout.decode()}")


def patch_gpu_compiler_libraries(self, mount_point: str | Path):
def patch_gpu_compiler_libraries(self, mount_point: Union[str, Path]):
"""
Fix GPUCompiler.framework's libraries to resolve linking issues
Expand Down

0 comments on commit 5011b2c

Please sign in to comment.