Repository navigation
Template 0.1.23: fix the mypy failure of the migration - #44
Merged
Merged
Conversation
…holders.py - v0_1_22_to_v0_1_23.py: mypy cannot infer the type of a lambda with default arguments (the CI failure of e2b9186); functools.partial does the same and is typed. - check_placeholders.py (live and resource copy) and migration_0_1_23.md: the form's placeholder table is conversion_table in placeholders.py (LabConstrictor_streamlit#3), not initializer.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
This will solve issue #40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the failing "Template tests" run of e2b9186 (template 0.1.23, #40) on
main.Problem
The tests and ruff passed, but mypy failed:
Changes
v0_1_22_to_v0_1_23.py: the lambda with default arguments (lambda relative=relative, wanted=wanted: ...) is replaced byfunctools.partial(_replace_placeholders, ...), which behaves the same and is typed.check_placeholders.py(the live file and its identical copy in.template_sync/resources/v0_1_22_to_v0_1_23/) andmigration_0_1_23.md: the form's placeholder table isconversion_tableinplaceholders.py(merged in Initialiser: fill PYTHON_PROJ_NAME in the installer scripts and keep line endings LabConstrictor_streamlit#3), notinitializer.py, which was never merged. Comment and docs only.Verified
With the versions CI installs (ruff 0.15.20, mypy 1.20.2):
python -m mypy .template_sync .tools/python tests: no issues in 61 files;ruff check .template_sync .tools/python tests: all checks passed;pytest tests/test_template_sync_0_1_22.py tests/test_template_sync_0_1_23.py: 39 passed.The full suite runs in CI on Linux; locally (Windows) it has the same Windows-only failures as before.
🤖 Generated with Claude Code