8000 WIP: Custom frozen dataclasses by tony · Pull Request #586 · tmux-python/libtmux · GitHub
[go: up one dir, main page]

Skip to content

WIP: Custom frozen dataclasses #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
pyproject(mypy) Add mypy override for frozen_dataclass_sealable `me…
…thod-assign`

why: Fix type checking errors in the custom frozen_dataclass implementation

what:
- Added targeted mypy configuration override to disable method-assign errors
- Only scoped to libtmux._internal.frozen_dataclass module
- Preserves strict type checking across the rest of the codebase

refs: Enables inheritance from mutable to immutable dataclasses
  • Loading branch information
A0D5
tony committed Apr 6, 2025
commit a38310f7f2f3401fe20f318b68209989058f1628
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ files = [
module = "libtmux._internal.frozen_dataclass"
disable_error_code = ["method-assign"]

[[tool.mypy.overrides]]
module = "libtmux._internal.frozen_dataclass_sealable"
disable_error_code = ["method-assign"]

[tool.coverage.run]
branch = true
parallel = true
Expand Down
0