-
Notifications
You must be signed in to change notification settings - Fork 152
Renaming Internal Structs #1059
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
Changes from 6 commits
80611e6
3c15d55
8affdc0
2529109
42daa1b
f995cb8
4200a39
580ecd5
03d3398
5eebc45
a669bcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,13 @@ def missing_exports(internal_obj, wrapped_obj) -> None: | |
| for attr in dir(internal_obj): | ||
| if attr in ["_global_ctx"]: | ||
| continue | ||
|
|
||
| # Check if Raw* classes have corresponding wrapper classes | ||
| elif attr.startswith("Raw"): | ||
| base_class = attr[3:] # Remove "Raw" prefix | ||
| assert hasattr(wrapped_obj, base_class) | ||
| continue | ||
|
|
||
| assert attr in dir(wrapped_obj) | ||
|
|
||
| internal_attr = getattr(internal_obj, attr) | ||
|
|
@@ -51,6 +58,8 @@ def missing_exports(internal_obj, wrapped_obj) -> None: | |
| if isinstance(internal_attr, list): | ||
| assert isinstance(wrapped_attr, list) | ||
| for val in internal_attr: | ||
| if isinstance(val, str) and val.startswith("Raw"): | ||
| continue | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we need an assert here to make certain this exposed class is in the list of the wrapper?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's being covered in the previous part of the test. Here: Though I think I should change the variable name from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous part catches that the class is exposed, but this portion of the test was, if my memory is correct, to ensure that everything that is in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 'RawExpr' isn't in
That would be helpful. I've added comments next to the new sections as well.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is more cohesive and well-structured, I have already ran the Ci test for this locally and it works, will push it if you approve this:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When you say that you tested it locally and it works, have you verified that it also fails when it is supposed to fail? I won't have time to review this again today, but I hope to get to it tomorrow.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I did not fail when I removed Now, if the
Sure. I'll see if I can find out any other gaps in my implementation till then. |
||
| assert val in wrapped_attr | ||
| elif hasattr(internal_attr, "__dict__"): | ||
| missing_exports(internal_attr, wrapped_attr) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.