Sync docstrings comments

This commit is contained in:
Mykola Grymalyuk
2023-02-09 12:36:16 -07:00
parent 0671828c9b
commit e076260a1a
2 changed files with 12 additions and 6 deletions

View File

@@ -124,7 +124,7 @@ class KernelDebugKitObject:
"""
Fetches the latest KDK for the current macOS version
Args:
Parameters:
host_build (str, optional): The build version of the current macOS version.
If empty, will use the host_build from the class. Defaults to None.
host_version (str, optional): The version of the current macOS version.
@@ -295,7 +295,7 @@ class KernelDebugKitObject:
Uses Apple's pkg receipt system to verify the original contents of the KDK
Args:
Parameters:
kdk_path (Path): Path to KDK
Returns:
@@ -434,7 +434,7 @@ class KernelDebugKitObject:
"""
Removes provided KDK
Args:
Parameters:
kdk_path (str): Path to KDK
"""
@@ -465,7 +465,7 @@ class KernelDebugKitObject:
"""
Removes KDKs that are not in use
Args:
Parameters:
exclude_builds (list, optional): Builds to exclude from removal.
If None, defaults to host and closest match builds.
"""
@@ -505,7 +505,7 @@ class KernelDebugKitObject:
"""
Validates KDK DMG checksum
Args:
Parameters:
kdk_dmg_path (str, optional): Path to KDK DMG. Defaults to None.
Returns:

View File

@@ -26,7 +26,7 @@ class InitializeLoggingSupport:
"""
def __init__(self) -> None:
def __init__(self):
self.log_filename: str = "OpenCore-Patcher.log"
self.log_filepath: Path = None
@@ -111,6 +111,10 @@ class InitializeLoggingSupport:
StreamHandler's format is used to mimic the default behavior of print()
While FileHandler's format is for more in-depth logging
Parameters:
log_to_file (bool): Whether to log to file or not
"""
logging.basicConfig(
@@ -125,6 +129,7 @@ class InitializeLoggingSupport:
logging.getLogger().handlers[0].setFormatter(logging.Formatter("%(message)s"))
logging.getLogger().handlers[1].maxBytes = self.max_file_size
def _attempt_initialize_logging_configuration(self):
"""
Attempt to initialize logging framework configuration
@@ -160,6 +165,7 @@ class InitializeLoggingSupport:
sys.excepthook = custom_excepthook
threading.excepthook = custom_thread_excepthook
def _restore_original_excepthook(self):
"""
Restore original traceback handlers