Skip to content

Add type comments to decorators#90

Open
timon-k wants to merge 1 commit intomainfrom
add-typing-support-to-decorators
Open

Add type comments to decorators#90
timon-k wants to merge 1 commit intomainfrom
add-typing-support-to-decorators

Conversation

@timon-k
Copy link
Contributor

@timon-k timon-k commented Feb 11, 2026

In order to be able to use the playback decorators in typed code without ignoring them, this PR adds type annotations to the interfaces which are used by users of the library.

For compatibility with Python 2, they are introduced as type comments only. It still requires some imports from typing, but I've tried to keep this minimal and import additional types only if TYPE_CHECKING.

@timon-k timon-k requested review from eitany and tdzienniak February 11, 2026 15:31
@timon-k timon-k force-pushed the add-typing-support-to-decorators branch from b6e6dd5 to 845ee21 Compare February 11, 2026 15:32
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 48.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.34%. Comparing base (8767147) to head (f7716dc).

Files with missing lines Patch % Lines
playback/tape_recorder.py 38.88% 11 Missing ⚠️
playback/interception/input_interception.py 66.66% 1 Missing ⚠️
playback/interception/output_interception.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
- Coverage   99.26%   98.34%   -0.93%     
==========================================
  Files          25       25              
  Lines        1367     1388      +21     
==========================================
+ Hits         1357     1365       +8     
- Misses         10       23      +13     

☔ 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.

@timon-k timon-k force-pushed the add-typing-support-to-decorators branch 3 times, most recently from 16f9800 to 98df0f6 Compare February 11, 2026 17:54
@timon-k timon-k force-pushed the add-typing-support-to-decorators branch from 98df0f6 to f7716dc Compare February 11, 2026 17:57
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.

3 participants