From b1834e06a21ce15d6c48189a79d0b5f23a080f77 Mon Sep 17 00:00:00 2001 From: Sachaa-Thanasius Date: Sun, 8 Sep 2024 18:27:28 +0530 Subject: [PATCH] Add more docstrings to .console since it's public interface. --- src/defer_imports/console.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/defer_imports/console.py b/src/defer_imports/console.py index 4023675..2acf2d3 100644 --- a/src/defer_imports/console.py +++ b/src/defer_imports/console.py @@ -2,6 +2,8 @@ # # SPDX-License-Identifier: MIT +"""Helpers for using defer_imports in various consoles, such as the built-in CPython REPL and IPython.""" + import __future__ import ast @@ -67,6 +69,8 @@ def interact() -> None: class _DeferredIPythonInstrumenter(ast.NodeTransformer): + """An AST transformer that wraps defer_import's AST transformation to fit the interface IPython's hook expects.""" + def __init__(self): self.actual_transformer = DeferredInstrumenter("", "", "utf-8")