Skip to content

Commit

Permalink
Add more docstrings to .console since it's public interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Sep 8, 2024
1 parent 1ba4116 commit b1834e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/defer_imports/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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("", "<unknown>", "utf-8")

Expand Down

0 comments on commit b1834e0

Please sign in to comment.