-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refined ABI type-check on assignment (#540)
* initial attempt * testcase * changelog * new test case and corner case for array casees * update type spec assignable check scheme * Add illustrative testing DSL for type_spec_is_assignable_to (#548) * Add illustrative testing DSL for type_spec_is_assignable_to * Use NamedTuple to construct `dataclass`-alike class * Boundary testcase group guarding Co-authored-by: Hang Su <87964331+ahangsu@users.noreply.github.com> * use Mike's categories to categorize test cases in 3 parts * minor, unorder declaration * declare methods on testing testcase coverage * minor, testing enforce testcase non empty * skip on abstract case * update coverage test on test case for bidirectional * unsafe bidirectional testcase coverage * coverage for safe assignment * no overlapping name * (Un)safe_bidirectional abstract class not existing boundary check Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * Uint test cases for unsafe_bidirectional Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * Bidirectional check over identical typespecs, in unsafe_bidirectional * Add list of type specs to skip in safe assignment Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * remove duplicates in safe bidirectional, for check is O(n^2) anyways * chaneg skip list to skip set in safe assignment * allowing uint8 byte mutual assignable * Update CHANGELOG.md by comment Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com> * documentation on behavior of type-assignment-to-check * some more mechanism on namedTuple comparison for assignability * better indentation * only inheritance from NamedTuple can be constructed, no inheritance-inheritance * better guard on NamedTuple inheritance construction * use issubclass rather than handwrite algorithm * update documentation to explain better * strengthen namedTupleTypeSpec equality, testcases * phrasing in `NamedTuple` construction docstring Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * update changelog Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
- Loading branch information
1 parent
33a4e5e
commit 221232a
Showing
8 changed files
with
457 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.