psygnal
psygnal copied to clipboard
Python observer pattern (callback/event system). Modeled after Qt Signals & Slots (but independent of Qt)
feat: make Signal and SignalInstance Generic, support static type validation of signal connections
supports the ability to perform static type checking on signal connection signatures ```python class Thing: sig = Signal(int, str) t = Thing() @t.sig.connect def cb1() -> None: ... # OK...
picking up from #169 ... starting over since lots has changed ```python from psygnal import evented from dataclasses import dataclass, field @evented @dataclass class Foo: x: int = 1 @evented(connect_child_events=True)...
solves #261 supersedes #260 Add a keyword argument to `SignalGroupDescriptor` to specify signal aliases (if the alias is None, no signal is emitted when changing the field). The signal aliases...
This PR is carrying on what I tried to do in #291. It all works, but makes for an unappealing consequence when annotating with `ClassVar[SignalGroupDescriptor]` as described in https://github.com/pyapp-kit/psygnal/pull/291#issuecomment-1988739365 working...
* psygnal version: 0.9.5 * Python version: 3.11.6 * Operating System: Ubuntu 22.04.3 ### Description After connecting events to mutable types, I would expect that events are called when they...
It will be nice to have pytest fixture to check if the Signal was emitted. Something similar to `qtbot.wati_singal` and `qtbot.wait_signals` This will be really helpful when using tread propagation...
updates: - [github.com/crate-ci/typos: v1.22.0 → v1.23.6](https://github.com/crate-ci/typos/compare/v1.22.0...v1.23.6) - [github.com/astral-sh/ruff-pre-commit: v0.4.7 → v0.5.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.7...v0.5.6) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.11.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.11.1)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.19.2 to 2.20.0. Release notes Sourced from pypa/cibuildwheel's releases. Version 2.20.0 🌟 CPython 3.13 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time...
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 2 to 3. Release notes Sourced from CodSpeedHQ/action's releases. v3.0.0 What's Changed chore(ci): run ci on every pull request by @adriencaccia in CodSpeedHQ/runner#23 feat/add codspeed cli by...
Playing around with a pattern to add simple validation via `Annotated` on evented dataclasses. There are *no* builtin validators. It simply allows someone to declare some simple validation prior to...