Skip to content

dbx_patch.patches.post_import_hook_verify

source module dbx_patch.patches.post_import_hook_verify

PostImportHook Compatibility Check.

This module verifies that PostImportHook.ImportHookFinder doesn't interfere with editable install imports.

PostImportHook is used to trigger callbacks after modules are imported. It shouldn't block imports, but we verify it doesn't interfere.

Classes

source class PostImportHookVerification(verbose: bool = True)

Bases : BaseVerification

Verification for PostImportHook compatibility.

Verifies that PostImportHook doesn't interfere with editable imports.

Initialize the verification (called only once due to singleton).

Parameters

  • verbose : bool Enable verbose logging

Methods

  • verify Verify PostImportHook doesn't interfere with editable imports.

  • is_verified Check if PostImportHook has been verified.

source method PostImportHookVerification.verify()PatchResult

Verify PostImportHook doesn't interfere with editable imports.

Returns

  • PatchResult PatchResult with verification details

source method PostImportHookVerification.is_verified()bool

Check if PostImportHook has been verified.

Returns

  • bool True if verified, False otherwise