Skip to content

Commit f17d4dd

Browse files
Tidy a little more (#27)
1 parent 638a78f commit f17d4dd

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Usage is very simple:
2020
pip install pytest-ipynb2
2121
```
2222

23-
1. Enable by adding to the default options in `pyproject.toml` ``:
23+
1. Enable by adding to the default options in `pyproject.toml`:
2424

2525
```toml
2626
[tool.pytest.ini_options]

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ check:
5353
fix:
5454
- uv run ruff check . --fix
5555
- uv run ruff format .
56+
- uv run ruff check . --fix # run again to fix any trailing commas
5657

5758
# format with ruff
5859
format:

pytest_ipynb2/_parser.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class Notebook:
6161
"""
6262

6363
def __init__(self, filepath: Path) -> None:
64+
self.codecells: SourceList
65+
"""The code cells *excluding* any identified as test cells"""
66+
self.testcells: SourceList
67+
"""The code cells which are identified as containing tests, based upon the presence of the `%%ipytest`magic."""
68+
6469
contents = nbformat.read(fp=str(filepath), as_version=4)
6570
nbformat.validate(contents)
6671
cells = contents.cells

0 commit comments

Comments
 (0)