Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlippedInterface should propagate flipped to subinterfaces. #954

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Nov 15, 2023

Fixes #950.

@cr1901 cr1901 requested a review from whitequark as a code owner November 15, 2023 23:03
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e55dec9) 83.79% compared to head (4ee09b2) 83.81%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #954      +/-   ##
==========================================
+ Coverage   83.79%   83.81%   +0.02%     
==========================================
  Files          54       54              
  Lines        7768     7766       -2     
  Branches     1906     1905       -1     
==========================================
  Hits         6509     6509              
+ Misses       1053     1051       -2     
  Partials      206      206              

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

amaranth/lib/wiring.py Outdated Show resolved Hide resolved
@wanda-phi
Copy link
Member

I'm not convinced a direct check for Interface is correct here — an interface doesn't actually have to inherit from the Interface class (and, for one, FlippedInterface doesn't), so this could break when a fancy Signature subclass with a custom interface class is involved.

A better check might be to check if 1) the name is in the signature, and 2) the relevant signature member is itself a signature.

@cr1901 cr1901 force-pushed the flipped branch 3 times, most recently from 31d67ab to 5c3a5b7 Compare November 16, 2023 01:58
@cr1901
Copy link
Contributor Author

cr1901 commented Nov 16, 2023

Improved added test after feedback from @wanda-phi (tyvm!).

@cr1901 cr1901 force-pushed the flipped branch 2 times, most recently from 61f466c to 3b7bfc8 Compare November 21, 2023 18:22
@whitequark whitequark added this to the 0.4 milestone Nov 22, 2023
@whitequark whitequark enabled auto-merge November 22, 2023 03:04
@whitequark whitequark added this pull request to the merge queue Nov 22, 2023
Merged via the queue into amaranth-lang:main with commit abd74ea Nov 22, 2023
14 checks passed
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.

Should Signature.__getattr__ propagate flipped to subinterfaces?
3 participants