Skip to content

Commit

Permalink
chore: Snoop on the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgate committed Jul 10, 2024
1 parent e610dcd commit 01beb34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
-r doc/requirements.txt \
-r example/requirements.txt \
-r test/requirements.txt
python3 -m pip install snoop
- name: Test install
run: python3 -m pip install .
Expand Down
2 changes: 2 additions & 0 deletions shell_logger/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ def auxiliary_command(
stderr = ""

max_anonymous_pipe_buffer_size = 65536

# This next line is where the hang occurs.
aux = os.read(self.aux_stdout_rfd, max_anonymous_pipe_buffer_size)
while aux[-1] != END_OF_READ:
stdout += aux.decode()
Expand Down
3 changes: 3 additions & 0 deletions shell_logger/shell_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from types import SimpleNamespace
from typing import Iterator, List, Optional, Union

import snoop

from .html_utilities import (
append_html,
child_logger_card,
Expand Down Expand Up @@ -130,6 +132,7 @@ def append(path: Path) -> ShellLogger:
with path.open("r") as jf:
return json.load(jf, cls=ShellLoggerDecoder)

@snoop(depth=4)
def __init__( # noqa: PLR0913
self,
name: str,
Expand Down

0 comments on commit 01beb34

Please sign in to comment.