Skip to content

Nicer playground#560

Merged
paugier merged 10 commits into
spylang:mainfrom
paugier:nicer-playground
Jun 14, 2026
Merged

Nicer playground#560
paugier merged 10 commits into
spylang:mainfrom
paugier:nicer-playground

Conversation

@paugier

@paugier paugier commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This PR contains several relatively small improvements of the playground.

The most important change is the fact that the playground now includes all examples in the four numbered categories (1_high_level, 2_metaprogramming, 3_low_level and 4_advanced).

Note: I used Claude for this!

@antocuni antocuni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apart the annotations comments.
If possible, I think it would be better to keep its mypy config consistent with all the other test files, and then we don't need the annotations.

Feel free to merge after doing it!

Comment thread playground/tests/test_spyast_js.py Outdated

@pytest.fixture
def init(self, tmpdir, _rodney):
def init(self, tmpdir: pytest.TempdirFactory, _rodney: Rodney) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this annotation is wrong: tmpdir should be a py.path.local I think

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but also, note that for files in spy/tests/ we have a special mypy.ini config specifically made to be able to use pytest fixtures without going crazy with annotations:

spy/mypy.ini

Lines 7 to 9 in 515c013

[mypy-spy.tests.*]
disallow_untyped_defs = False
check_untyped_defs = True

so maybe we should do the same for this test file?

@paugier paugier force-pushed the nicer-playground branch from 1fcf071 to 2057ce7 Compare June 14, 2026 09:10
@paugier paugier merged commit 8bfb663 into spylang:main Jun 14, 2026
7 checks passed
@paugier paugier mentioned this pull request Jun 14, 2026
paugier added a commit that referenced this pull request Jun 14, 2026
I broke the playground with my PR #560. This should fix it by copying the right directories for the playground.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants