Skip to content

refactor(constants): remove final pyright suppression#29

Merged
tmustier merged 1 commit intomainfrom
refactor/constants-final-suppression
Feb 12, 2026
Merged

refactor(constants): remove final pyright suppression#29
tmustier merged 1 commit intomainfrom
refactor/constants-final-suppression

Conversation

@tmustier
Copy link
Owner

Summary

Remove the final remaining local pyright suppression by making the constants reload path pyright-safe without changing runtime behavior.

Changes

  • clean_slides/constants.py
    • removed file-level directive:
      • # pyright: reportConstantRedefinition=false
    • replaced direct reassignments of uppercase module constants inside reload_constants(...) with dynamic module writes:
      • globals()["MOON_SIZE_EMU"] = ...
      • globals()["ICON_DEFAULT_SIZE_EMU"] = ...
      • globals()["BULLET_DEF_TAB_SZ_EMU"] = ...

This avoids pyright reportConstantRedefinition on uppercase names while preserving effective runtime assignment semantics.

Validation

  • .venv/bin/pyright
  • .venv/bin/pytest -q
  • .venv/bin/pre-commit run --all-files

Result

rg -n "^# pyright:" clean_slides tests now returns no matches.

@tmustier tmustier merged commit e32076e into main Feb 12, 2026
7 checks passed
@tmustier tmustier deleted the refactor/constants-final-suppression branch February 12, 2026 11:16
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.

1 participant