Skip to content

Comments

🔧 Add typing to Scanner#382

Merged
chrisjsewell merged 2 commits intoexecutablebooks:masterfrom
Alunderin:master
Feb 18, 2026
Merged

🔧 Add typing to Scanner#382
chrisjsewell merged 2 commits intoexecutablebooks:masterfrom
Alunderin:master

Conversation

@Alunderin
Copy link
Contributor

Changes state_inline.Scanner into a typing.NamedTuple instead of a collections.namedtuple. They should be functionally equivalent except that the former has typing for its members while the latter does not.

I tend to use strict type checking for my own projects so it'd be nice if Pyright didn't freak out when I try to access the result of scanDelims without using typing.cast.

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.80%. Comparing base (2f6ae10) to head (de1fb4b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #382   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files          64       64           
  Lines        3455     3457    +2     
=======================================
+ Hits         3310     3312    +2     
  Misses        145      145           
Flag Coverage Δ
pytests 95.80% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@chrisjsewell chrisjsewell changed the title Add typing to Scanner 🔧 Add typing to Scanner Feb 18, 2026
Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheers!

@chrisjsewell chrisjsewell merged commit 8933147 into executablebooks:master Feb 18, 2026
15 checks passed
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.

2 participants