Skip to content

Feature: more typing - #513

Open
PigBrainOverflow wants to merge 7 commits into
UCSBarchlab:developmentfrom
PigBrainOverflow:feature/more-typing
Open

Feature: more typing#513
PigBrainOverflow wants to merge 7 commits into
UCSBarchlab:developmentfrom
PigBrainOverflow:feature/more-typing

Conversation

@PigBrainOverflow

Copy link
Copy Markdown

#511

  • Fix the Register.next setter annotation to reflect that augmented assignment passes a Register._Next object back through the setter.
  • Change match_bitwidth's return type to Iterator[WireVector], matching its current generator-based implementation.
  • Change concat_list's parameter type from list[WireVectorLike] to Sequence[WireVectorLike].
  • New implementation of adder and fir.

The typing changes are annotation-only and do not change runtime behavior.

This PR focuses only on fixing the identified type annotations. I have not added repository-wide type-regression testing yet, since doing that robustly is a substantially larger piece of work.

A useful regression test would first require choosing a representative baseline and defining what it means for the typing state to become "no worse." This is not necessarily equivalent to comparing the number of diagnostics: a future change might eliminate several existing errors while introducing a smaller number of different errors, and it is not obvious whether that should be considered an improvement or a regression.

It would therefore be better to design the baseline and comparison policy separately, rather than introducing a fragile diagnostic-counting test as part of this PR.

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.

1 participant