Skip to content

Template 0.1.23: fix the mypy failure of the migration - #44

Merged
IvanHCenalmor merged 1 commit into
mainfrom
claude/template-0.1.23-mypy
Nov 12, 2026
Merged

IvanHCenalmor merged 1 commit into
mainfrom
claude/template-0.1.23-mypy

Conversation

@IvanHCenalmor

Copy link
Copy Markdown
Collaborator

Fixes the failing "Template tests" run of e2b9186 (template 0.1.23, #40) on main.

Problem

The tests and ruff passed, but mypy failed:

.template_sync/migrations/v0_1_22_to_v0_1_23.py:184: error: Cannot infer type of lambda  [misc]

Changes

  • v0_1_22_to_v0_1_23.py: the lambda with default arguments (lambda relative=relative, wanted=wanted: ...) is replaced by functools.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/) and migration_0_1_23.md: the form's placeholder table is conversion_table in placeholders.py (merged in Initialiser: fill PYTHON_PROJ_NAME in the installer scripts and keep line endings LabConstrictor_streamlit#3), not initializer.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

…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>
@IvanHCenalmor

Copy link
Copy Markdown
Collaborator Author

This will solve issue #40

@IvanHCenalmor
IvanHCenalmor merged commit 7ea98a5 into main Nov 12, 2026
4 checks passed
@IvanHCenalmor
IvanHCenalmor deleted the claude/template-0.1.23-mypy branch November 12, 2026 11:35
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.

Installer fails for apps with src/: PYTHON_PROJ_NAME is never replaced in post_install.sh / .bat

1 participant