Skip to content

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Apr 1, 2024

supports the ability to perform static type checking on signal connection signatures

class Thing:
    sig = Signal(int, str)

t = Thing()

@t.sig.connect
def cb1() -> None: ...  # OK
@t.sig.connect
def cb2(a0: int) -> None: ...  # OK
@t.sig.connect
def cb3(a0: int, a1: str) -> None: ...  # OK

@t.sig.connect
def cb5(a0: int, a1: str, a2: float) -> None: ...  # ERR: too many params
@t.sig.connect
def cb6(a0: str) -> None: ...  # ERR: wrong type for a0

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.83%. Comparing base (8bf2d82) to head (44c222b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #304   +/-   ##
=======================================
  Coverage   99.82%   99.83%           
=======================================
  Files          22       22           
  Lines        2351     2365   +14     
=======================================
+ Hits         2347     2361   +14     
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

codspeed-hq bot commented Apr 1, 2024

CodSpeed Performance Report

Merging #304 will degrade performances by 52.55%

Comparing tlambert03:generic-signal (44c222b) with main (8bf2d82)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 65 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_create_signal 62.8 µs 27.4 µs ×2.3
test_create_signal_instance 34.8 µs 73.3 µs -52.55%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant