Skip to content

Commit

Permalink
Fix bug in notebook tester (#743)
Browse files Browse the repository at this point in the history
Was reporting warnings as `<class 'str'>`, which wasn't very helpful.

See
https://github.com/Qiskit/documentation/actions/runs/7745198894/job/21120640259
for an example.
  • Loading branch information
frankharkins authored Feb 1, 2024
1 parent 155f984 commit 52038ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/nb-tester/test-notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def print_yellow(s: str, **kwargs):
"""
Use ANSI escape codes to print yellow text
"""
print(f"\033[0;33m{str}\033[0m", **kwargs)
print(f"\033[0;33m{s}\033[0m", **kwargs)


def extract_warnings(notebook: nbformat.NotebookNode) -> list[NotebookWarning]:
Expand Down

0 comments on commit 52038ae

Please sign in to comment.